diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-10-15 22:06:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-15 22:06:23 (GMT) |
commit | aadb44ee98bc73bc5132acea5848ac6aef1ff8c0 (patch) | |
tree | aae1018851a530de323c04a994c5b232b94ee8ae /Python/errors.c | |
parent | 43308dfc3335906cfefe9f14a44e468935f3c321 (diff) | |
download | cpython-aadb44ee98bc73bc5132acea5848ac6aef1ff8c0.zip cpython-aadb44ee98bc73bc5132acea5848ac6aef1ff8c0.tar.gz cpython-aadb44ee98bc73bc5132acea5848ac6aef1ff8c0.tar.bz2 |
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 2e438cc2554495b28480a3ffe5cdf41b6ab823a0)
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions