Skip to content

Commit 68c7776

Browse files
Fix the gdb hooks.
1 parent fba56f5 commit 68c7776

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tools/gdb/libpython.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,8 @@ def __init__(self, gdbval, cast_to=None):
871871
self.f_lineno = int_from_int(self.field('f_lineno'))
872872
self.f_lasti = int_from_int(self.field('f_lasti'))
873873
self.co_nlocals = int_from_int(self.co.field('co_nlocals'))
874-
pnames = self.co.field('co_fastlocalnames')
875-
self.co_fastlocalnames = PyTupleObjectPtr.from_pyobject_ptr(pnames)
874+
pnames = self.co.field('co_localsplusnames')
875+
self.co_localsplusnames = PyTupleObjectPtr.from_pyobject_ptr(pnames)
876876

877877
def iter_locals(self):
878878
'''
@@ -887,7 +887,7 @@ def iter_locals(self):
887887
pyop_value = PyObjectPtr.from_pyobject_ptr(f_localsplus[i])
888888
if pyop_value.is_null():
889889
continue
890-
pyop_name = PyObjectPtr.from_pyobject_ptr(self.co_fastlocalnames[i])
890+
pyop_name = PyObjectPtr.from_pyobject_ptr(self.co_localsplusnames[i])
891891
yield (pyop_name, pyop_value)
892892

893893
def _f_globals(self):

0 commit comments

Comments
 (0)