summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-10-15 21:19:57 (GMT)
committerGitHub <noreply@github.com>2018-10-15 21:19:57 (GMT)
commit2e438cc2554495b28480a3ffe5cdf41b6ab823a0 (patch)
tree00c918509850590d1371ac31a859b961e5959a51 /Misc
parentee171a26c1169abfae534b08acc0d95c6e45a22a (diff)
downloadcpython-2e438cc2554495b28480a3ffe5cdf41b6ab823a0.zip
cpython-2e438cc2554495b28480a3ffe5cdf41b6ab823a0.tar.gz
cpython-2e438cc2554495b28480a3ffe5cdf41b6ab823a0.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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Tools-Demos/2018-10-15-13-22-28.bpo-34989.hU4fra.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Tools-Demos/2018-10-15-13-22-28.bpo-34989.hU4fra.rst b/Misc/NEWS.d/next/Tools-Demos/2018-10-15-13-22-28.bpo-34989.hU4fra.rst
new file mode 100644
index 0000000..53bb425
--- /dev/null
+++ b/Misc/NEWS.d/next/Tools-Demos/2018-10-15-13-22-28.bpo-34989.hU4fra.rst
@@ -0,0 +1,2 @@
+python-gdb.py now handles errors on computing the line number of a Python
+frame.