diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-27 02:49:29 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-27 02:49:29 (GMT) |
commit | 44c19f64a5b10c4a68aee8757d68c54c9129d757 (patch) | |
tree | 2d3fa9f3cd6db5ede85116edaac0e365d94c9936 /Misc/gdbinit | |
parent | 1e93f2b5bea9a6c59bb7c61bbaf8fcbb2828d1a4 (diff) | |
download | cpython-44c19f64a5b10c4a68aee8757d68c54c9129d757.zip cpython-44c19f64a5b10c4a68aee8757d68c54c9129d757.tar.gz cpython-44c19f64a5b10c4a68aee8757d68c54c9129d757.tar.bz2 |
Get gdb macros working with unicode and PyVarObject change
Diffstat (limited to 'Misc/gdbinit')
-rw-r--r-- | Misc/gdbinit | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Misc/gdbinit b/Misc/gdbinit index f3cb2ea..96f3439 100644 --- a/Misc/gdbinit +++ b/Misc/gdbinit @@ -32,7 +32,7 @@ define pylocals while $_i < f->f_nlocals if f->f_localsplus + $_i != 0 set $_names = co->co_varnames - set $_name = PyString_AsString(PyTuple_GetItem($_names, $_i)) + set $_name = PyUnicode_AsString(PyTuple_GetItem($_names, $_i)) printf "%s:\n", $_name # side effect of calling _PyObject_Dump is to dump the object's # info - assigning just prevents gdb from printing the @@ -49,7 +49,7 @@ define lineno set $__continue = 1 set $__co = f->f_code set $__lasti = f->f_lasti - set $__sz = ((PyStringObject *)$__co->co_lnotab)->ob_size/2 + set $__sz = ((PyVarObject *)$__co->co_lnotab)->ob_size/2 set $__p = (unsigned char *)((PyStringObject *)$__co->co_lnotab)->ob_sval set $__li = $__co->co_firstlineno set $__ad = 0 @@ -74,7 +74,7 @@ end define pyframe set $__fn = (char *)((PyStringObject *)co->co_filename)->ob_sval - set $__n = (char *)((PyStringObject *)co->co_name)->ob_sval + set $__n = PyUnicode_AsString(co->co_name) printf "%s (", $__fn lineno printf "): %s\n", $__n |