]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#9919: fix off-by-one error in lineno command in Misc/gdbinit; also add newline to...
authorGeorg Brandl <georg@python.org>
Thu, 21 Oct 2010 12:59:14 +0000 (12:59 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 21 Oct 2010 12:59:14 +0000 (12:59 +0000)
Misc/gdbinit

index 3b4dec6198d8f369d281ce6540f7d4ba810baaca..275df10083b48c95467d74601bdb99a42b485832 100644 (file)
@@ -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