]> granicus.if.org Git - python/commitdiff
Fix the "pylocals" gdb command.
authorGeorg Brandl <georg@python.org>
Thu, 23 Jul 2009 09:17:09 +0000 (09:17 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 23 Jul 2009 09:17:09 +0000 (09:17 +0000)
Misc/gdbinit

index e648f1647bc266c1856a327fdddea01ede156cce..316ff3d525cdd111857613c2c8ffcb4fbcb70f8a 100644 (file)
@@ -29,7 +29,7 @@ end
 # print the local variables of the current frame
 define pylocals
     set $_i = 0
-    while $_i < f->f_nlocals
+    while $_i < f->f_code->co_nlocals
        if f->f_localsplus + $_i != 0
            set $_names = co->co_varnames
            set $_name = PyString_AsString(PyTuple_GetItem($_names, $_i))