summaryrefslogtreecommitdiff
path: root/Misc/gdbinit
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-21 12:59:14 +0000
committerGeorg Brandl <georg@python.org>2010-10-21 12:59:14 +0000
commite06845e7faa5b2576acf5c0b0c33964703dc4d3f (patch)
tree22633820b740ba2c8b7aa0fe0d3a0024b57c6f1a /Misc/gdbinit
parentdd38bdf9e3f6d64a5cdef1b67cab3b4570bf59e6 (diff)
downloadcpython-e06845e7faa5b2576acf5c0b0c33964703dc4d3f.tar.gz
#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 3b4dec6198..275df10083 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