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 2e438cc) Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
@vstinner: Status check is done, and it's a success ✅ . |
|
@vstinner: Status check is done, and it's a success ✅ . |
python-gdb.py now handles errors on computing the line number
of a Python frame.
Changes:
calling addr2line(), instead of failing with a surprising "<class
'TypeError'> 'FakeRepr' object is not subscriptable" error.
returning None.
getting a line from the Python source file.
(cherry picked from commit 2e438cc)
Co-authored-by: Victor Stinner vstinner@redhat.com
https://bugs.python.org/issue34989