diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-09-05 16:16:49 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-09-05 16:16:49 (GMT) |
commit | 4655e44b0fa735fb7ce913a2591f0208e046a46b (patch) | |
tree | f96b4b3b9dac3df0d7d7c2ef9e8ff6473f80f5a6 | |
parent | 7da4edac285569f5aa2f6a8c788f172f565d9a0d (diff) | |
download | cpython-4655e44b0fa735fb7ce913a2591f0208e046a46b.zip cpython-4655e44b0fa735fb7ce913a2591f0208e046a46b.tar.gz cpython-4655e44b0fa735fb7ce913a2591f0208e046a46b.tar.bz2 |
break sets a breakpoint rather than stopping the loop.
It *appears* a flag is necessary instead.
This was tested in gdb 6.0.
Backport candidate
-rw-r--r-- | Misc/gdbinit | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Misc/gdbinit b/Misc/gdbinit index ee03cc2..f3cb2ea 100644 --- a/Misc/gdbinit +++ b/Misc/gdbinit @@ -46,18 +46,19 @@ end # A rewrite of the Python interpreter's line number calculator in GDB's # command language 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 $__p = (unsigned char *)((PyStringObject *)$__co->co_lnotab)->ob_sval set $__li = $__co->co_firstlineno set $__ad = 0 - while ($__sz-1 >= 0) + while ($__sz-1 >= 0 && $__continue) set $__sz = $__sz - 1 set $__ad = $__ad + *$__p set $__p = $__p + 1 if ($__ad > $__lasti) - break + set $__continue = 0 end set $__li = $__li + *$__p set $__p = $__p + 1 |