aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-11-27 22:17:29 +0000
committerNick Roberts2005-11-27 22:17:29 +0000
commite83637f972ff5dec63bcf09a9cd9a8f4876af292 (patch)
tree60e5ab88c8656611f8a685ad8ca4e87ab0e686a1
parent55cd42a4c1898b9d3a1efdf0cd8c36e53eb007c8 (diff)
downloademacs-e83637f972ff5dec63bcf09a9cd9a8f4876af292.tar.gz
emacs-e83637f972ff5dec63bcf09a9cd9a8f4876af292.zip
(gud-gdb-marker-filter): When GDB is invoked with a process number, detect it.
(gud-speedbar-buttons): Match regexp more carefully.
-rw-r--r--lisp/progmodes/gud.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 3e13d7d1c0b..81ae4c3cd02 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -453,7 +453,7 @@ required by the caller."
453 (raise-frame speedbar-frame)) 453 (raise-frame speedbar-frame))
454 (let ((var-list gdb-var-list)) 454 (let ((var-list gdb-var-list))
455 (while var-list 455 (while var-list
456 (let* ((depth 0) (start 0) (char ?+) 456 (let* (char (depth 0) (start 0)
457 (var (car var-list)) (varnum (nth 1 var))) 457 (var (car var-list)) (varnum (nth 1 var)))
458 (while (string-match "\\." varnum start) 458 (while (string-match "\\." varnum start)
459 (setq depth (1+ depth) 459 (setq depth (1+ depth)
@@ -470,8 +470,10 @@ required by the caller."
470 'font-lock-warning-face 470 'font-lock-warning-face
471 nil) depth) 471 nil) depth)
472 (if (and (cadr var-list) 472 (if (and (cadr var-list)
473 (string-match varnum (cadr (cadr var-list)))) 473 (string-match (concat varnum "\\.")
474 (setq char ?-)) 474 (cadr (cadr var-list))))
475 (setq char ?-)
476 (setq char ?+))
475 (if (string-match "\\*$" (nth 3 var)) 477 (if (string-match "\\*$" (nth 3 var))
476 (speedbar-make-tag-line 'bracket char 478 (speedbar-make-tag-line 'bracket char
477 'gdb-speedbar-expand-node varnum 479 'gdb-speedbar-expand-node varnum
@@ -574,6 +576,11 @@ required by the caller."
574 ;; they are found. 576 ;; they are found.
575 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) 577 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc)
576 (let ((match (match-string 1 gud-marker-acc))) 578 (let ((match (match-string 1 gud-marker-acc)))
579
580 ;; Pick up stopped annotation if attaching to process.
581 (if (string-equal match "stopped") (setq gdb-active-process t))
582
583 ;; Using annotations, switch to gud-gdba-marker-filter.
577 (when (string-equal match "prompt") 584 (when (string-equal match "prompt")
578 (require 'gdb-ui) 585 (require 'gdb-ui)
579 (gdb-prompt nil)) 586 (gdb-prompt nil))
@@ -587,6 +594,8 @@ required by the caller."
587 ;; Set the accumulator to the remaining text. 594 ;; Set the accumulator to the remaining text.
588 595
589 gud-marker-acc (substring gud-marker-acc (match-end 0))) 596 gud-marker-acc (substring gud-marker-acc (match-end 0)))
597
598 ;; Pick up any errors that occur before first prompt annotation.
590 (if (string-equal match "error-begin") 599 (if (string-equal match "error-begin")
591 (put-text-property 0 (length gud-marker-acc) 600 (put-text-property 0 (length gud-marker-acc)
592 'face font-lock-warning-face 601 'face font-lock-warning-face