summaryrefslogtreecommitdiffstats
path: root/Tools/gdb/libpython.py
diff options
context:
space:
mode:
authorBrandt Bucher <brandt@python.org>2022-01-05 11:30:26 (GMT)
committerGitHub <noreply@github.com>2022-01-05 11:30:26 (GMT)
commit332e6b972567debfa9d8f3f9a4a966c7ad15eec9 (patch)
treeb5813cf03292f6639c9dc2a97d470390dafb37e5 /Tools/gdb/libpython.py
parentcae55542d23e606dde9819d5dadd7430085fcc77 (diff)
downloadcpython-332e6b972567debfa9d8f3f9a4a966c7ad15eec9.zip
cpython-332e6b972567debfa9d8f3f9a4a966c7ad15eec9.tar.gz
cpython-332e6b972567debfa9d8f3f9a4a966c7ad15eec9.tar.bz2
bpo-45256: Don't track the exact depth of each `InterpreterFrame` (GH-30372)
Diffstat (limited to 'Tools/gdb/libpython.py')
-rwxr-xr-xTools/gdb/libpython.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index a0a95e3..e3d73bc 100755
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -1044,8 +1044,8 @@ class PyFramePtr:
def _f_lasti(self):
return self._f_special("f_lasti", int_from_int)
- def depth(self):
- return self._f_special("depth", int_from_int)
+ def is_entry(self):
+ return self._f_special("is_entry", bool)
def previous(self):
return self._f_special("previous", PyFramePtr)
@@ -1860,7 +1860,7 @@ class Frame(object):
line = interp_frame.current_line()
if line is not None:
sys.stdout.write(' %s\n' % line.strip())
- if interp_frame.depth() == 0:
+ if interp_frame.is_entry():
break
else:
sys.stdout.write('#%i (unable to read python frame information)\n' % self.get_index())
@@ -1883,7 +1883,7 @@ class Frame(object):
line = interp_frame.current_line()
if line is not None:
sys.stdout.write(' %s\n' % line.strip())
- if interp_frame.depth() == 0:
+ if interp_frame.is_entry():
break
else:
sys.stdout.write(' (unable to read python frame information)\n')
@@ -2147,7 +2147,7 @@ class PyLocals(gdb.Command):
% (pyop_name.proxyval(set()),
pyop_value.get_truncated_repr(MAX_OUTPUT_LEN)))
- if pyop_frame.depth() == 0:
+ if pyop_frame.is_entry():
break
pyop_frame = pyop_frame.previous()