https://github.com/python/cpython
Revision aadb44ee98bc73bc5132acea5848ac6aef1ff8c0 authored by Victor Stinner on 15 October 2018, 22:06:23 UTC, committed by GitHub on 15 October 2018, 22:06:23 UTC
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)
1 parent 43308df
History
Tip revision: aadb44ee98bc73bc5132acea5848ac6aef1ff8c0 authored by Victor Stinner on 15 October 2018, 22:06:23 UTC
bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) (GH-9899)
Tip revision: aadb44e
File Mode Size
.github
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.bzrignore -rw-r--r-- 552 bytes
.gitattributes -rw-r--r-- 809 bytes
.gitignore -rw-r--r-- 1.2 KB
.travis.yml -rw-r--r-- 3.8 KB
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 48.1 KB
README -rw-r--r-- 54.4 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.2 KB
config.sub -rwxr-xr-x 35.7 KB
configure -rwxr-xr-x 439.1 KB
configure.ac -rw-r--r-- 142.7 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 35.0 KB
setup.py -rw-r--r-- 98.2 KB

README

back to top