summaryrefslogtreecommitdiffstats
path: root/Python/fileutils.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-10-15 21:50:41 (GMT)
committerGitHub <noreply@github.com>2018-10-15 21:50:41 (GMT)
commit71e601eb0857fb03c1dd3c349afb030ef84f95d0 (patch)
tree136dcfb581a4f5d84189de46887f1fad1bf3b973 /Python/fileutils.c
parent407f3dd69192ee8614faf1f9a484045a39174c74 (diff)
downloadcpython-71e601eb0857fb03c1dd3c349afb030ef84f95d0.zip
cpython-71e601eb0857fb03c1dd3c349afb030ef84f95d0.tar.gz
cpython-71e601eb0857fb03c1dd3c349afb030ef84f95d0.tar.bz2
bpo-34989: python-gdb.py: fix current_line_num() (GH-9889)
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) Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Python/fileutils.c')
0 files changed, 0 insertions, 0 deletions