diff --git a/Misc/NEWS.d/next/Tools-Demos/2017-08-14-15-37-38.bpo-30983.A7UzX8.rst b/Misc/NEWS.d/next/Tools-Demos/2017-08-14-15-37-38.bpo-30983.A7UzX8.rst new file mode 100644 index 00000000000..44c5e1c6967 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2017-08-14-15-37-38.bpo-30983.A7UzX8.rst @@ -0,0 +1,4 @@ +With PEP 523, gdb's Python integration stopped working properly for frames +using the ``_PyEval_EvalFrameDefault`` function. Affected functionality +included `py-list` and `py-bt`. This is now fixed. Patch by Bruno "Polaco" +Penteado. diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 31ae8117c78..40e0a677cd0 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