cpython/Tools/gdb
Victor Stinner aadb44ee98
bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) (GH-9899)
python-gdb.py now handles errors on computing the line number
of a Python frame.

Changes:

* PyFrameObjectPtr.current_line_num() now catchs any Exception on
  calling addr2line(), instead of failing with a surprising "<class
  'TypeError'> 'FakeRepr' object is not subscriptable" error.
* All callers of current_line_num() now handle current_line_num()
  returning None.
* PyFrameObjectPtr.current_line() now also catchs IndexError on
  getting a line from the Python source file.

(cherry picked from commit 2e438cc255)
2018-10-16 00:06:23 +02:00
..
libpython.py bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) (GH-9899) 2018-10-16 00:06:23 +02:00