diff options
author | Ćukasz Langa <lukasz@langa.pl> | 2017-08-14 23:06:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-14 23:06:28 (GMT) |
commit | 09b77165e3fffa7b7ff160ad06042cdcfa004bf5 (patch) | |
tree | a959fa18d911387335a411f0af57e31409a488b9 /Tools/gdb | |
parent | f2d769d539279f01a6589dd3a0d5865dd00e13b0 (diff) | |
download | cpython-09b77165e3fffa7b7ff160ad06042cdcfa004bf5.zip cpython-09b77165e3fffa7b7ff160ad06042cdcfa004bf5.tar.gz cpython-09b77165e3fffa7b7ff160ad06042cdcfa004bf5.tar.bz2 |
[3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (GH-2803) (#3090)
pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.
Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.
This patch fixes that. Tested locally on python3.6
(cherry picked from commit 2e0f4db114)
Diffstat (limited to 'Tools/gdb')
-rwxr-xr-x | Tools/gdb/libpython.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 31ae811..40e0a67 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1502,8 +1502,10 @@ class Frame(object): return False def is_evalframeex(self): - '''Is this a PyEval_EvalFrameEx frame?''' - if self._gdbframe.name() == 'PyEval_EvalFrameEx': + '''Is this a PyEval_EvalFrameEx or _PyEval_EvalFrameDefault (PEP 0523) + frame?''' + if self._gdbframe.name() in ('PyEval_EvalFrameEx', + '_PyEval_EvalFrameDefault'): ''' I believe we also need to filter on the inline struct frame_id.inline_depth, only regarding frames with |