[Python-checkins] python/dist/src/Misc gdbinit,1.10,1.11
nnorwitz@users.sourceforge.net
nnorwitz at users.sourceforge.net
Mon Sep 5 18:17:00 CEST 2005
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25467/Misc
Modified Files:
gdbinit
Log Message:
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
Index: gdbinit
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/gdbinit,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gdbinit 13 Aug 2005 00:28:41 -0000 1.10
+++ gdbinit 5 Sep 2005 16:16:49 -0000 1.11
@@ -46,18 +46,19 @@
# 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
More information about the Python-checkins
mailing list