[3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python ext… · python/cpython@09b7716

File tree

2 files changed

lines changed

  • Misc/NEWS.d/next/Tools-Demos

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,4 @@

1+

With PEP 523, gdb's Python integration stopped working properly for frames

2+

using the ``_PyEval_EvalFrameDefault`` function. Affected functionality

3+

included `py-list` and `py-bt`. This is now fixed. Patch by Bruno "Polaco"

4+

Penteado.

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