aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-11-24 00:34:59 +0000
committerNick Roberts2005-11-24 00:34:59 +0000
commit66395e6be053fb79f093ebbc8abf8e527224e68b (patch)
treeb15454e23b56e0bda1c73a2e3794105e157c3601
parent55b2dea3c42e4479dcf40caba66091da5da2a617 (diff)
downloademacs-66395e6be053fb79f093ebbc8abf8e527224e68b.tar.gz
emacs-66395e6be053fb79f093ebbc8abf8e527224e68b.zip
(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 "#".
-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 @@
67;; and compiling with -DUNBUFFERED while debugging. 67;; and compiling with -DUNBUFFERED while debugging.
68;; 68;;
69;; Known Bugs: 69;; Known Bugs:
70;; 1) Strings that are watched don't update in the speedbar when their
71;; contents change.
72;; 2) Watch expressions go out of scope when the inferior is re-run.
70;; 73;;
71;; TODO: 74;; TODO:
72;; 1) Use MI command -data-read-memory for memory window. 75;; 1) Use MI command -data-read-memory for memory window.
@@ -471,6 +474,21 @@ With arg, use separate IO iff arg is positive."
471 (forward-char 2) 474 (forward-char 2)
472 (gud-call (concat "until *%a"))))))))) 475 (gud-call (concat "until *%a")))))))))
473 476
477(defcustom gdb-speedbar-auto-raise t
478 "If non-nil raise speedbar every time display of watch expressions is\
479 updated."
480 :type 'boolean
481 :group 'gud
482 :version "22.1")
483
484(defun gdb-speedbar-auto-raise (arg)
485 "Toggle automatic raising of the speedbar for watch expressions."
486 (interactive "P")
487 (setq gdb-speedbar-auto-raise
488 (if (null arg)
489 (not gdb-speedbar-auto-raise)
490 (> (prefix-numeric-value arg) 0))))
491
474(defcustom gdb-use-colon-colon-notation nil 492(defcustom gdb-use-colon-colon-notation nil
475 "If non-nil use FUN::VAR format to display variables in the speedbar." 493 "If non-nil use FUN::VAR format to display variables in the speedbar."
476 :type 'boolean 494 :type 'boolean
@@ -516,7 +534,7 @@ With arg, use separate IO iff arg is positive."
516 (speedbar-change-initial-expansion-list "GUD")) 534 (speedbar-change-initial-expansion-list "GUD"))
517 (if (or (equal (nth 2 var) "0") 535 (if (or (equal (nth 2 var) "0")
518 (and (equal (nth 2 var) "1") 536 (and (equal (nth 2 var) "1")
519 (string-match "char \\*" (nth 3 var)))) 537 (string-match "char \\*$" (nth 3 var))))
520 (gdb-enqueue-input 538 (gdb-enqueue-input
521 (list 539 (list
522 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 540 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
@@ -577,7 +595,7 @@ type=\"\\(.*?\\)\"")
577 (push varchild var-list) 595 (push varchild var-list)
578 (if (or (equal (nth 2 varchild) "0") 596 (if (or (equal (nth 2 varchild) "0")
579 (and (equal (nth 2 varchild) "1") 597 (and (equal (nth 2 varchild) "1")
580 (string-match "char \\*" (nth 3 varchild)))) 598 (string-match "char \\*$" (nth 3 varchild))))
581 (gdb-enqueue-input 599 (gdb-enqueue-input
582 (list 600 (list
583 (concat 601 (concat
@@ -604,16 +622,12 @@ type=\"\\(.*?\\)\"")
604 (catch 'var-found-1 622 (catch 'var-found-1
605 (let ((varnum (match-string 1))) 623 (let ((varnum (match-string 1)))
606 (dolist (var gdb-var-list) 624 (dolist (var gdb-var-list)
607 (when (and (string-equal varnum (cadr var)) 625 (gdb-enqueue-input
608 (or (equal (nth 2 var) "0") 626 (list
609 (and (equal (nth 2 var) "1") 627 (concat "server interpreter mi \"-var-evaluate-expression "
610 (string-match "char \\*" (nth 3 var))))) 628 varnum "\"\n")
611 (gdb-enqueue-input 629 `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))
612 (list 630 (throw 'var-found-1 nil))))))
613 (concat "server interpreter mi \"-var-evaluate-expression "
614 varnum "\"\n")
615 `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))
616 (throw 'var-found-1 nil)))))))
617 (setq gdb-pending-triggers 631 (setq gdb-pending-triggers
618 (delq 'gdb-var-update gdb-pending-triggers)) 632 (delq 'gdb-var-update gdb-pending-triggers))
619 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 633 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
@@ -1661,7 +1675,7 @@ static char *magick[] = {
1661 (while (< (point) (point-max)) 1675 (while (< (point) (point-max))
1662 (setq bl (line-beginning-position) 1676 (setq bl (line-beginning-position)
1663 el (line-end-position)) 1677 el (line-end-position))
1664 (unless (looking-at "No ") 1678 (when (looking-at "#")
1665 (add-text-properties bl el 1679 (add-text-properties bl el
1666 '(mouse-face highlight 1680 '(mouse-face highlight
1667 help-echo "mouse-2, RET: Select frame"))) 1681 help-echo "mouse-2, RET: Select frame")))