From 29848f0570ad595b1f0ae4e7a3d85f6694187cd3 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(-) 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 -- cgit v0.12