Mailing List Archive

Reactivate primary mechanism to retrieve frames in the gdb helpers (GH-29682)
https://github.com/python/cpython/commit/4cf65240ae3fbd0e85d8b1e1a9e35f4065843c8c
commit: 4cf65240ae3fbd0e85d8b1e1a9e35f4065843c8c
branch: main
author: Pablo Galindo Salgado <Pablogsal@gmail.com>
committer: pablogsal <Pablogsal@gmail.com>
date: 2021-11-21T02:06:16Z
summary:

Reactivate primary mechanism to retrieve frames in the gdb helpers (GH-29682)

files:
M Tools/gdb/libpython.py

diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index 71c99b516b34f..a105e58b4af90 100755
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -1797,10 +1797,10 @@ 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
@@ -1865,6 +1865,7 @@ def print_summary(self):
break
else:
sys.stdout.write('#%i (unable to read python frame information)\n' % self.get_index())
+ break
interp_frame = interp_frame.previous()
else:
info = self.is_other_python_frame()
@@ -1887,6 +1888,7 @@ def print_traceback(self):
break
else:
sys.stdout.write(' (unable to read python frame information)\n')
+ break
interp_frame = interp_frame.previous()
else:
info = self.is_other_python_frame()

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins