aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-05-28 12:15:33 +0000
committerNick Roberts2005-05-28 12:15:33 +0000
commit8164904190cf82406b0dbd9b5a4437635caeb0dc (patch)
treedb0e45ede84b495f5af9269e940efd1e225b4864
parent3daabdddfa51d48c66afa21d27d789c46d52b3b2 (diff)
downloademacs-8164904190cf82406b0dbd9b5a4437635caeb0dc.tar.gz
emacs-8164904190cf82406b0dbd9b5a4437635caeb0dc.zip
(gdb-assembler-custom): Be more careful about preserving point.
-rw-r--r--lisp/progmodes/gdb-ui.el32
1 files changed, 17 insertions, 15 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index ecb8f63f8ea..df9d455f7df 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -2439,20 +2439,21 @@ BUFFER nil or omitted means use the current buffer."
2439 (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) 2439 (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))
2440 (pos 1) (address) (flag) (bptno)) 2440 (pos 1) (address) (flag) (bptno))
2441 (with-current-buffer buffer 2441 (with-current-buffer buffer
2442 (if (not (equal gdb-frame-address "main")) 2442 (save-excursion
2443 (progn 2443 (if (not (equal gdb-frame-address "main"))
2444 (goto-char (point-min)) 2444 (progn
2445 (if (and gdb-frame-address 2445 (goto-char (point-min))
2446 (re-search-forward gdb-frame-address nil t)) 2446 (if (and gdb-frame-address
2447 (progn 2447 (re-search-forward gdb-frame-address nil t))
2448 (setq pos (point)) 2448 (progn
2449 (beginning-of-line) 2449 (setq pos (point))
2450 (or gdb-overlay-arrow-position 2450 (beginning-of-line)
2451 (setq gdb-overlay-arrow-position (make-marker))) 2451 (or gdb-overlay-arrow-position
2452 (set-marker gdb-overlay-arrow-position 2452 (setq gdb-overlay-arrow-position (make-marker)))
2453 (point) (current-buffer)))))) 2453 (set-marker gdb-overlay-arrow-position
2454 ;; remove all breakpoint-icons in assembler buffer before updating. 2454 (point) (current-buffer))))))
2455 (gdb-remove-breakpoint-icons (point-min) (point-max))) 2455 ;; remove all breakpoint-icons in assembler buffer before updating.
2456 (gdb-remove-breakpoint-icons (point-min) (point-max))))
2456 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) 2457 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
2457 (goto-char (point-min)) 2458 (goto-char (point-min))
2458 (while (< (point) (- (point-max) 1)) 2459 (while (< (point) (- (point-max) 1))
@@ -2465,9 +2466,10 @@ BUFFER nil or omitted means use the current buffer."
2465 (setq flag (char-after (match-beginning 2))) 2466 (setq flag (char-after (match-beginning 2)))
2466 (setq address (match-string 3)) 2467 (setq address (match-string 3))
2467 (with-current-buffer buffer 2468 (with-current-buffer buffer
2469 (save-excursion
2468 (goto-char (point-min)) 2470 (goto-char (point-min))
2469 (if (re-search-forward address nil t) 2471 (if (re-search-forward address nil t)
2470 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) 2472 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))))
2471 (if (not (equal gdb-frame-address "main")) 2473 (if (not (equal gdb-frame-address "main"))
2472 (set-window-point (get-buffer-window buffer 0) pos)))) 2474 (set-window-point (get-buffer-window buffer 0) pos))))
2473 2475