Mercurial > emacs
changeset 63653:ec766f32b118
(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.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Wed, 22 Jun 2005 08:45:01 +0000 |
parents | cec122e2c385 |
children | c89e1f2b9a64 |
files | lisp/progmodes/gdb-ui.el |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Wed Jun 22 08:43:02 2005 +0000 +++ b/lisp/progmodes/gdb-ui.el Wed Jun 22 08:45:01 2005 +0000 @@ -85,6 +85,7 @@ (defvar gdb-find-file-unhook nil) (defvar gdb-active-process nil "GUD tooltips display variable values when t, \ and #define directives otherwise.") +(defvar gdb-error "Non-nil when GDB is reporting an error.") (defvar gdb-macro-info nil "Non-nil if GDB knows that the inferior includes preprocessor macro info.") @@ -359,6 +360,7 @@ gdb-flush-pending-output nil gdb-location-alist nil gdb-find-file-unhook nil + gdb-error nil gdb-macro-info nil) ;; (setq gdb-buffer-type 'gdba) @@ -860,6 +862,8 @@ ("watchpoint" gdb-stopping) ("frame-begin" gdb-frame-begin) ("stopped" gdb-stopped) + ("error-begin" gdb-error) + ("error" gdb-error) ) "An assoc mapping annotation tags to functions which process them.") (defun gdb-resync() @@ -989,6 +993,9 @@ (gdb-resync) (error "Unexpected stopped annotation"))))) +(defun gdb-error (ignored) + (setq gdb-error (not gdb-error))) + (defun gdb-post-prompt (ignored) "An annotation handler for `post-prompt'. This begins the collection of output from the current command if that @@ -1083,6 +1090,8 @@ output))) (defun gdb-concat-output (so-far new) + (if gdb-error + (put-text-property 0 (length new) 'face font-lock-warning-face new)) (let ((sink gdb-output-sink)) (cond ((eq sink 'user) (concat so-far new))