Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e0f4db

Browse files
bcapambv
authored andcommitted
bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (#2803)
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
1 parent 143be36 commit 2e0f4db

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Tools/gdb/libpython.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,8 +1502,10 @@ def is_python_frame(self):
15021502
return False
15031503

15041504
def is_evalframeex(self):
1505-
'''Is this a PyEval_EvalFrameEx frame?'''
1506-
if self._gdbframe.name() == 'PyEval_EvalFrameEx':
1505+
'''Is this a PyEval_EvalFrameEx or _PyEval_EvalFrameDefault (PEP 0523)
1506+
frame?'''
1507+
if self._gdbframe.name() in ('PyEval_EvalFrameEx',
1508+
'_PyEval_EvalFrameDefault'):
15071509
'''
15081510
I believe we also need to filter on the inline
15091511
struct frame_id.inline_depth, only regarding frames with

0 commit comments

Comments
 (0)