aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-05-31 20:55:48 +0000
committerNick Roberts2005-05-31 20:55:48 +0000
commit4cbf66013b4e8fa3f3129489a50e950132899325 (patch)
tree64603aad23f083fbf2b920f2e8247dde251da8d7
parent7653a3dc4256a359c25aa03ee5d899b3b1841356 (diff)
downloademacs-4cbf66013b4e8fa3f3129489a50e950132899325.tar.gz
emacs-4cbf66013b4e8fa3f3129489a50e950132899325.zip
(gdb-set-gud-minor-mode-1)
(gdb-info-breakpoints-custom, gdb-delete-breakpoint) (gdb-goto-breakpoint, gdb-source-info, gdb-get-location) (gdb-assembler-custom): Improve regexps. (def-gdb-auto-update-handler): Use window point to ensure it is preserved.
-rw-r--r--lisp/progmodes/gdb-ui.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index c906e101339..a9274cfcae7 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -277,7 +277,7 @@ Also display the main routine in the disassembly buffer if present."
277(defun gdb-set-gud-minor-mode-1 (buffer) 277(defun gdb-set-gud-minor-mode-1 (buffer)
278 (goto-char (point-min)) 278 (goto-char (point-min))
279 (when (and (search-forward "Located in " nil t) 279 (when (and (search-forward "Located in " nil t)
280 (looking-at "\\S-*") 280 (looking-at "\\S-+")
281 (string-equal (buffer-file-name buffer) 281 (string-equal (buffer-file-name buffer)
282 (match-string 0))) 282 (match-string 0)))
283 (with-current-buffer buffer 283 (with-current-buffer buffer
@@ -1161,12 +1161,12 @@ happens to be appropriate."
1161 (let ((buf (gdb-get-buffer ',buf-key))) 1161 (let ((buf (gdb-get-buffer ',buf-key)))
1162 (and buf 1162 (and buf
1163 (with-current-buffer buf 1163 (with-current-buffer buf
1164 (let ((p (point)) 1164 (let ((p (window-point (get-buffer-window buf 0)))
1165 (buffer-read-only nil)) 1165 (buffer-read-only nil))
1166 (erase-buffer) 1166 (erase-buffer)
1167 (insert-buffer-substring (gdb-get-create-buffer 1167 (insert-buffer-substring (gdb-get-create-buffer
1168 'gdb-partial-output-buffer)) 1168 'gdb-partial-output-buffer))
1169 (goto-char p))))) 1169 (set-window-point (get-buffer-window buf 0) p)))))
1170 ;; put customisation here 1170 ;; put customisation here
1171 (,custom-defun))) 1171 (,custom-defun)))
1172 1172
@@ -1304,7 +1304,7 @@ static char *magick[] = {
1304 (goto-char (point-min)) 1304 (goto-char (point-min))
1305 (while (< (point) (- (point-max) 1)) 1305 (while (< (point) (- (point-max) 1))
1306 (forward-line 1) 1306 (forward-line 1)
1307 (if (looking-at "[^\t].*breakpoint") 1307 (if (looking-at "[^\t].*?breakpoint")
1308 (progn 1308 (progn
1309 (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)") 1309 (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)")
1310 (setq bptno (match-string 1)) 1310 (setq bptno (match-string 1))
@@ -1463,9 +1463,9 @@ static char *magick[] = {
1463 (interactive) 1463 (interactive)
1464 (beginning-of-line 1) 1464 (beginning-of-line 1)
1465 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1465 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1466 (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") 1466 (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)")
1467 (looking-at 1467 (looking-at
1468 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+")) 1468 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+"))
1469 (gdb-enqueue-input 1469 (gdb-enqueue-input
1470 (list 1470 (list
1471 (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) 1471 (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore))
@@ -1478,10 +1478,10 @@ static char *magick[] = {
1478 (save-excursion 1478 (save-excursion
1479 (beginning-of-line 1) 1479 (beginning-of-line 1)
1480 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1480 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1481 (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)") 1481 (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)")
1482 (looking-at 1482 (looking-at
1483 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\ 1483 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\
1484\\(\\S-*\\):\\([0-9]+\\)")) 1484\\(\\S-+\\):\\([0-9]+\\)"))
1485 (let ((bptno (match-string 1)) 1485 (let ((bptno (match-string 1))
1486 (file (match-string 2)) 1486 (file (match-string 2))
1487 (line (match-string 3))) 1487 (line (match-string 3)))
@@ -2301,7 +2301,7 @@ Kills the gdb buffers and resets the source buffers."
2301buffers." 2301buffers."
2302 (goto-char (point-min)) 2302 (goto-char (point-min))
2303 (if (and (search-forward "Located in " nil t) 2303 (if (and (search-forward "Located in " nil t)
2304 (looking-at "\\S-*")) 2304 (looking-at "\\S-+"))
2305 (setq gdb-main-file (match-string 0))) 2305 (setq gdb-main-file (match-string 0)))
2306 (goto-char (point-min)) 2306 (goto-char (point-min))
2307 (if (search-forward "Includes preprocessor macro info." nil t) 2307 (if (search-forward "Includes preprocessor macro info." nil t)
@@ -2319,7 +2319,7 @@ Put in buffer and place breakpoint icon."
2319 (goto-char (point-min)) 2319 (goto-char (point-min))
2320 (catch 'file-not-found 2320 (catch 'file-not-found
2321 (if (search-forward "Located in " nil t) 2321 (if (search-forward "Located in " nil t)
2322 (when (looking-at "\\S-*") 2322 (when (looking-at "\\S-+")
2323 (delete (cons bptno "File not found") gdb-location-alist) 2323 (delete (cons bptno "File not found") gdb-location-alist)
2324 (push (cons bptno (match-string 0)) gdb-location-alist)) 2324 (push (cons bptno (match-string 0)) gdb-location-alist))
2325 (gdb-resync) 2325 (gdb-resync)
@@ -2493,7 +2493,7 @@ BUFFER nil or omitted means use the current buffer."
2493 (goto-char (point-min)) 2493 (goto-char (point-min))
2494 (while (< (point) (- (point-max) 1)) 2494 (while (< (point) (- (point-max) 1))
2495 (forward-line 1) 2495 (forward-line 1)
2496 (if (looking-at "[^\t].*breakpoint") 2496 (if (looking-at "[^\t].*?breakpoint")
2497 (progn 2497 (progn
2498 (looking-at 2498 (looking-at
2499 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)") 2499 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)")