aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-06-22 08:45:01 +0000
committerNick Roberts2005-06-22 08:45:01 +0000
commit98c751fe30991d57ee237bf538d810260101da7d (patch)
tree119fe7c1f0c09b2b432a99133a131b9d0fa129cc
parent8431b136350e90ff8fdc7c123f9f0ad09ef20586 (diff)
downloademacs-98c751fe30991d57ee237bf538d810260101da7d.tar.gz
emacs-98c751fe30991d57ee237bf538d810260101da7d.zip
(gdb-error): New variable.
(gdb-error): New function. (gdb-annotation-rules): Act on error-begin and error annotations. (gdb-concat-output): Use font-lock-warning-face for errors.
-rw-r--r--lisp/progmodes/gdb-ui.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 3a34a621fc6..5977783475a 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -85,6 +85,7 @@
85(defvar gdb-find-file-unhook nil) 85(defvar gdb-find-file-unhook nil)
86(defvar gdb-active-process nil "GUD tooltips display variable values when t, \ 86(defvar gdb-active-process nil "GUD tooltips display variable values when t, \
87and #define directives otherwise.") 87and #define directives otherwise.")
88(defvar gdb-error "Non-nil when GDB is reporting an error.")
88(defvar gdb-macro-info nil 89(defvar gdb-macro-info nil
89 "Non-nil if GDB knows that the inferior includes preprocessor macro info.") 90 "Non-nil if GDB knows that the inferior includes preprocessor macro info.")
90 91
@@ -359,6 +360,7 @@ Also display the main routine in the disassembly buffer if present."
359 gdb-flush-pending-output nil 360 gdb-flush-pending-output nil
360 gdb-location-alist nil 361 gdb-location-alist nil
361 gdb-find-file-unhook nil 362 gdb-find-file-unhook nil
363 gdb-error nil
362 gdb-macro-info nil) 364 gdb-macro-info nil)
363 ;; 365 ;;
364 (setq gdb-buffer-type 'gdba) 366 (setq gdb-buffer-type 'gdba)
@@ -860,6 +862,8 @@ This filter may simply queue input for a later time."
860 ("watchpoint" gdb-stopping) 862 ("watchpoint" gdb-stopping)
861 ("frame-begin" gdb-frame-begin) 863 ("frame-begin" gdb-frame-begin)
862 ("stopped" gdb-stopped) 864 ("stopped" gdb-stopped)
865 ("error-begin" gdb-error)
866 ("error" gdb-error)
863 ) "An assoc mapping annotation tags to functions which process them.") 867 ) "An assoc mapping annotation tags to functions which process them.")
864 868
865(defun gdb-resync() 869(defun gdb-resync()
@@ -989,6 +993,9 @@ sink to `user' in `gdb-stopping', that is fine."
989 (gdb-resync) 993 (gdb-resync)
990 (error "Unexpected stopped annotation"))))) 994 (error "Unexpected stopped annotation")))))
991 995
996(defun gdb-error (ignored)
997 (setq gdb-error (not gdb-error)))
998
992(defun gdb-post-prompt (ignored) 999(defun gdb-post-prompt (ignored)
993 "An annotation handler for `post-prompt'. 1000 "An annotation handler for `post-prompt'.
994This begins the collection of output from the current command if that 1001This begins the collection of output from the current command if that
@@ -1083,6 +1090,8 @@ happens to be appropriate."
1083 output))) 1090 output)))
1084 1091
1085(defun gdb-concat-output (so-far new) 1092(defun gdb-concat-output (so-far new)
1093 (if gdb-error
1094 (put-text-property 0 (length new) 'face font-lock-warning-face new))
1086 (let ((sink gdb-output-sink)) 1095 (let ((sink gdb-output-sink))
1087 (cond 1096 (cond
1088 ((eq sink 'user) (concat so-far new)) 1097 ((eq sink 'user) (concat so-far new))