mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
bpo-45637: Fix cframe-based fallback in the gdb helpers (GH-29515)
This commit is contained in:
parent
6ec0dec7b7
commit
20205ad2b5
|
@ -1797,14 +1797,14 @@ def is_gc_collect(self):
|
|||
|
||||
def get_pyop(self):
|
||||
try:
|
||||
frame = self._gdbframe.read_var('frame')
|
||||
frame = PyFramePtr(frame)
|
||||
if not frame.is_optimized_out():
|
||||
return frame
|
||||
# frame = self._gdbframe.read_var('frame')
|
||||
# frame = PyFramePtr(frame)
|
||||
# if not frame.is_optimized_out():
|
||||
# return frame
|
||||
cframe = self._gdbframe.read_var('cframe')
|
||||
if cframe is None:
|
||||
return None
|
||||
frame = PyFramePtr(cframe["current_frame"].dereference())
|
||||
frame = PyFramePtr(cframe["current_frame"])
|
||||
if frame and not frame.is_optimized_out():
|
||||
return frame
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue