summaryrefslogtreecommitdiffstats
path: root/Tools/gdb
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-06-04 16:51:05 (GMT)
committerGitHub <noreply@github.com>2021-06-04 16:51:05 (GMT)
commit17c4edc4e0692fe55e185755ea8a2f5238f3ef08 (patch)
tree563807f4bbdebbf89b2065e4807cc291c44be2b1 /Tools/gdb
parenta46c220edc5cf716d0b71eb80ac29ecdb4ebb430 (diff)
downloadcpython-17c4edc4e0692fe55e185755ea8a2f5238f3ef08.zip
cpython-17c4edc4e0692fe55e185755ea8a2f5238f3ef08.tar.gz
cpython-17c4edc4e0692fe55e185755ea8a2f5238f3ef08.tar.bz2
bpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and b2bf2bc1ece673d387341e06c8d3c2bc6e259747 (GH-26530)
* Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)" This reverts commit b2bf2bc1ece673d387341e06c8d3c2bc6e259747. * Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)" This reverts commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f. These two commits are breaking the refleak buildbots.
Diffstat (limited to 'Tools/gdb')
-rwxr-xr-xTools/gdb/libpython.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index 756b52c..c1d2cd8 100755
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -871,8 +871,7 @@ class PyFrameObjectPtr(PyObjectPtr):
self.f_lineno = int_from_int(self.field('f_lineno'))
self.f_lasti = int_from_int(self.field('f_lasti'))
self.co_nlocals = int_from_int(self.co.field('co_nlocals'))
- pnames = self.co.field('co_localsplusnames')
- self.co_localsplusnames = PyTupleObjectPtr.from_pyobject_ptr(pnames)
+ self.co_varnames = PyTupleObjectPtr.from_pyobject_ptr(self.co.field('co_varnames'))
def iter_locals(self):
'''
@@ -885,10 +884,9 @@ class PyFrameObjectPtr(PyObjectPtr):
f_localsplus = self.field('f_localsptr')
for i in safe_range(self.co_nlocals):
pyop_value = PyObjectPtr.from_pyobject_ptr(f_localsplus[i])
- if pyop_value.is_null():
- continue
- pyop_name = PyObjectPtr.from_pyobject_ptr(self.co_localsplusnames[i])
- yield (pyop_name, pyop_value)
+ if not pyop_value.is_null():
+ pyop_name = PyObjectPtr.from_pyobject_ptr(self.co_varnames[i])
+ yield (pyop_name, pyop_value)
def _f_globals(self):
f_localsplus = self.field('f_localsptr')