From e06845e7faa5b2576acf5c0b0c33964703dc4d3f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 21 Oct 2010 12:59:14 +0000 Subject: #9919: fix off-by-one error in lineno command in Misc/gdbinit; also add newline to its output. --- Misc/gdbinit | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Misc/gdbinit') 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 -- cgit v1.2.1