aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2007-10-02 10:55:29 +0000
committerNick Roberts2007-10-02 10:55:29 +0000
commitb621b522ad55adf972e5fdcf1da3acdaf6af59a1 (patch)
tree9ab16e3423501a6d9e4dad2f13fa5f5dfff37e0d
parent2a08c1760bddbb939198eeba5cefa0b68427230a (diff)
downloademacs-b621b522ad55adf972e5fdcf1da3acdaf6af59a1.tar.gz
emacs-b621b522ad55adf972e5fdcf1da3acdaf6af59a1.zip
(gdb): Make gdba default and switch to gdb
if appropriate, i.e., reverse previous arrangement. (gud-gdb-marker-filter): Adapt for above change.
-rw-r--r--lisp/progmodes/gud.el22
1 files changed, 5 insertions, 17 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 4ec478dbf62..b25695f3902 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -635,14 +635,6 @@ required by the caller."
635 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) 635 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc)
636 (let ((match (match-string 1 gud-marker-acc))) 636 (let ((match (match-string 1 gud-marker-acc)))
637 637
638 ;; Pick up stopped annotation if attaching to process.
639 (if (string-equal match "stopped") (setq gdb-active-process t))
640
641 ;; Using annotations, switch to gud-gdba-marker-filter.
642 (when (string-equal match "prompt")
643 (require 'gdb-ui)
644 (gdb-prompt nil))
645
646 (setq 638 (setq
647 ;; Append any text before the marker to the output we're going 639 ;; Append any text before the marker to the output we're going
648 ;; to return - we don't include the marker in this text. 640 ;; to return - we don't include the marker in this text.
@@ -651,13 +643,7 @@ required by the caller."
651 643
652 ;; Set the accumulator to the remaining text. 644 ;; Set the accumulator to the remaining text.
653 645
654 gud-marker-acc (substring gud-marker-acc (match-end 0))) 646 gud-marker-acc (substring gud-marker-acc (match-end 0)))))
655
656 ;; Pick up any errors that occur before first prompt annotation.
657 (if (string-equal match "error-begin")
658 (put-text-property 0 (length gud-marker-acc)
659 'face font-lock-warning-face
660 gud-marker-acc))))
661 647
662 ;; Does the remaining text look like it might end with the 648 ;; Does the remaining text look like it might end with the
663 ;; beginning of another marker? If it does, then keep it in 649 ;; beginning of another marker? If it does, then keep it in
@@ -725,6 +711,8 @@ text command mode to debug multiple programs within one Emacs
725session." 711session."
726 (interactive (list (gud-query-cmdline 'gdb))) 712 (interactive (list (gud-query-cmdline 'gdb)))
727 713
714 (require 'gdb-ui)
715
728 (when (and gud-comint-buffer 716 (when (and gud-comint-buffer
729 (buffer-name gud-comint-buffer) 717 (buffer-name gud-comint-buffer)
730 (get-buffer-process gud-comint-buffer) 718 (get-buffer-process gud-comint-buffer)
@@ -733,8 +721,8 @@ session."
733 (error 721 (error
734 "Multiple debugging requires restarting in text command mode")) 722 "Multiple debugging requires restarting in text command mode"))
735 723
736 (gud-common-init command-line nil 'gud-gdb-marker-filter) 724 (gud-common-init command-line nil 'gud-gdba-marker-filter)
737 (set (make-local-variable 'gud-minor-mode) 'gdb) 725 (set (make-local-variable 'gud-minor-mode) 'gdba)
738 726
739 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") 727 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.")
740 (gud-def gud-tbreak "tbreak %f:%l" "\C-t" 728 (gud-def gud-tbreak "tbreak %f:%l" "\C-t"