summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2005-11-24 00:34:59 +0000
committerNick Roberts <nickrob@snap.net.nz>2005-11-24 00:34:59 +0000
commit66395e6be053fb79f093ebbc8abf8e527224e68b (patch)
treeb15454e23b56e0bda1c73a2e3794105e157c3601 /lisp/progmodes/gdb-ui.el
parent55b2dea3c42e4479dcf40caba66091da5da2a617 (diff)
downloademacs-66395e6be053fb79f093ebbc8abf8e527224e68b.tar.gz
(gdb-speedbar-auto-raise): New function and variable.
(gdb-var-create-handler, gdb-var-list-children-handler): Don't match on "char **...". (gdb-var-update-handler): Find values for all variable objects. (gdb-info-frames-custom): Identify frames by leading "#".
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r--lisp/progmodes/gdb-ui.el40
1 files changed, 27 insertions, 13 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 961ee0747ff..3010d3e6561 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -67,6 +67,9 @@
;; and compiling with -DUNBUFFERED while debugging.
;;
;; Known Bugs:
+;; 1) Strings that are watched don't update in the speedbar when their
+;; contents change.
+;; 2) Watch expressions go out of scope when the inferior is re-run.
;;
;; TODO:
;; 1) Use MI command -data-read-memory for memory window.
@@ -471,6 +474,21 @@ With arg, use separate IO iff arg is positive."
(forward-char 2)
(gud-call (concat "until *%a")))))))))
+(defcustom gdb-speedbar-auto-raise t
+ "If non-nil raise speedbar every time display of watch expressions is\
+ updated."
+ :type 'boolean
+ :group 'gud
+ :version "22.1")
+
+(defun gdb-speedbar-auto-raise (arg)
+ "Toggle automatic raising of the speedbar for watch expressions."
+ (interactive "P")
+ (setq gdb-speedbar-auto-raise
+ (if (null arg)
+ (not gdb-speedbar-auto-raise)
+ (> (prefix-numeric-value arg) 0))))
+
(defcustom gdb-use-colon-colon-notation nil
"If non-nil use FUN::VAR format to display variables in the speedbar."
:type 'boolean
@@ -516,7 +534,7 @@ With arg, use separate IO iff arg is positive."
(speedbar-change-initial-expansion-list "GUD"))
(if (or (equal (nth 2 var) "0")
(and (equal (nth 2 var) "1")
- (string-match "char \\*" (nth 3 var))))
+ (string-match "char \\*$" (nth 3 var))))
(gdb-enqueue-input
(list
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
@@ -577,7 +595,7 @@ type=\"\\(.*?\\)\"")
(push varchild var-list)
(if (or (equal (nth 2 varchild) "0")
(and (equal (nth 2 varchild) "1")
- (string-match "char \\*" (nth 3 varchild))))
+ (string-match "char \\*$" (nth 3 varchild))))
(gdb-enqueue-input
(list
(concat
@@ -604,16 +622,12 @@ type=\"\\(.*?\\)\"")
(catch 'var-found-1
(let ((varnum (match-string 1)))
(dolist (var gdb-var-list)
- (when (and (string-equal varnum (cadr var))
- (or (equal (nth 2 var) "0")
- (and (equal (nth 2 var) "1")
- (string-match "char \\*" (nth 3 var)))))
- (gdb-enqueue-input
- (list
- (concat "server interpreter mi \"-var-evaluate-expression "
- varnum "\"\n")
- `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))
- (throw 'var-found-1 nil)))))))
+ (gdb-enqueue-input
+ (list
+ (concat "server interpreter mi \"-var-evaluate-expression "
+ varnum "\"\n")
+ `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))
+ (throw 'var-found-1 nil))))))
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers))
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
@@ -1661,7 +1675,7 @@ static char *magick[] = {
(while (< (point) (point-max))
(setq bl (line-beginning-position)
el (line-end-position))
- (unless (looking-at "No ")
+ (when (looking-at "#")
(add-text-properties bl el
'(mouse-face highlight
help-echo "mouse-2, RET: Select frame")))