summaryrefslogtreecommitdiff
path: root/Misc/gdbinit
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-09-05 16:16:49 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2005-09-05 16:16:49 +0000
commit9fda6fe0e84d5e446e888713511761c80395e4ca (patch)
tree14764323044d8ebcca47be78f0d4ae11645dcb3e /Misc/gdbinit
parent691a5cdebb0277eae1309e155a3c24f41a9f9b69 (diff)
downloadcpython-9fda6fe0e84d5e446e888713511761c80395e4ca.tar.gz
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
Diffstat (limited to 'Misc/gdbinit')
-rw-r--r--Misc/gdbinit5
1 files changed, 3 insertions, 2 deletions
diff --git a/Misc/gdbinit b/Misc/gdbinit
index ee03cc2431..f3cb2ead06 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