diff lisp/progmodes/gdb-mi.el @ 104774:468b7fa34d2c

Use forward-line rather than goto-line.
author Glenn Morris <rgm@gnu.org>
date Tue, 01 Sep 2009 03:18:44 +0000
parents 78dd253006d6
children 7d4483022eb4
line wrap: on
line diff
--- a/lisp/progmodes/gdb-mi.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/progmodes/gdb-mi.el	Tue Sep 01 03:18:44 2009 +0000
@@ -910,7 +910,8 @@
 		  (gud-call (concat "until " (number-to-string line))))
     (gdb-if-arrow gdb-disassembly-position
 		  (save-excursion
-		    (goto-line (line-number-at-pos (posn-point end)))
+		    (goto-char (point-min))
+		    (forward-line (1- (line-number-at-pos (posn-point end))))
 		    (forward-char 2)
 		    (gud-call (concat "until *%a"))))))
 
@@ -930,7 +931,8 @@
 		    (gud-call (concat "jump " (number-to-string line)))))
     (gdb-if-arrow gdb-disassembly-position
 		  (save-excursion
-		    (goto-line (line-number-at-pos (posn-point end)))
+		    (goto-char (point-min))
+		    (forward-line (1- (line-number-at-pos (posn-point end))))
 		    (forward-char 2)
 		    (progn
 		      (gud-call (concat "tbreak *%a"))
@@ -3337,7 +3339,8 @@
 			       (display-buffer buffer))))
 	      (setq gdb-source-window window)
 	      (with-current-buffer buffer
-		(goto-line (string-to-number line))
+		(goto-char (point-min))
+		(forward-line (1- (string-to-number line)))
 		(set-window-point window (point))))))
       (error "Not recognized as break/watchpoint line")))))