summaryrefslogtreecommitdiffstats
path: root/Misc/gdbinit
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-21 12:59:14 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-21 12:59:14 (GMT)
commit29848f0570ad595b1f0ae4e7a3d85f6694187cd3 (patch)
tree6906bee7a1220bf260007622bc0903848e1094f5 /Misc/gdbinit
parenta9afb68789cdc2d8d3262afc2ffa209b5d8e224a (diff)
downloadcpython-29848f0570ad595b1f0ae4e7a3d85f6694187cd3.zip
cpython-29848f0570ad595b1f0ae4e7a3d85f6694187cd3.tar.gz
cpython-29848f0570ad595b1f0ae4e7a3d85f6694187cd3.tar.bz2
#9919: fix off-by-one error in lineno command in Misc/gdbinit; also add newline to its output.
Diffstat (limited to 'Misc/gdbinit')
-rw-r--r--Misc/gdbinit7
1 files changed, 4 insertions, 3 deletions
diff --git a/Misc/gdbinit b/Misc/gdbinit
index 3b4dec6..275df10 100644
--- a/Misc/gdbinit
+++ b/Misc/gdbinit
@@ -61,11 +61,12 @@ define lineno
set $__p = $__p + 1
if ($__ad > $__lasti)
set $__continue = 0
+ else
+ set $__li = $__li + *$__p
+ set $__p = $__p + 1
end
- set $__li = $__li + *$__p
- set $__p = $__p + 1
end
- printf "%d", $__li
+ printf "%d\n", $__li
end
# print the current frame - verbose