mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
[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
)
This commit is contained in:
parent
f2d769d539
commit
09b77165e3
2 changed files with 8 additions and 2 deletions
|
@ -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.
|
|
@ -1502,8 +1502,10 @@ class Frame(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def is_evalframeex(self):
|
def is_evalframeex(self):
|
||||||
'''Is this a PyEval_EvalFrameEx frame?'''
|
'''Is this a PyEval_EvalFrameEx or _PyEval_EvalFrameDefault (PEP 0523)
|
||||||
if self._gdbframe.name() == 'PyEval_EvalFrameEx':
|
frame?'''
|
||||||
|
if self._gdbframe.name() in ('PyEval_EvalFrameEx',
|
||||||
|
'_PyEval_EvalFrameDefault'):
|
||||||
'''
|
'''
|
||||||
I believe we also need to filter on the inline
|
I believe we also need to filter on the inline
|
||||||
struct frame_id.inline_depth, only regarding frames with
|
struct frame_id.inline_depth, only regarding frames with
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue