aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorNick Roberts <[email protected]>2005-07-15 14:45:09 +0000
committerNick Roberts <[email protected]>2005-07-15 14:45:09 +0000
commit4c199fcee98802d94f10be6fb1e3e99cc6e0d487 (patch)
tree1abbedd36a46cb8096855e4df461d3ae2ac40b35 /lisp/progmodes
parentfd9a7f35a18ec7d6ab0bdb5359d817641840184a (diff)
(gdb-var-update, gdb-var-update-handler):
Don't consider gdbmi (gdb-mi.el has its own update functions). (gdb-var-delete): Make it work for gdbmi as well. (gdb-speedbar-expand-node): Move var-update here for gdbmi.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/gdb-ui.el33
1 files changed, 14 insertions, 19 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index f4b6a705ea..8a426a3736 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -503,15 +503,11 @@ Also display the main routine in the disassembly buffer if present."
(setq gdb-var-list (nreverse var-list))))))
(defun gdb-var-update ()
- (if (not (member 'gdb-var-update gdb-pending-triggers))
- (progn
- (gdb-enqueue-input
- (list
- (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
- "server interpreter mi \"-var-update *\"\n"
- "-var-update *\n")
- 'gdb-var-update-handler))
- (push 'gdb-var-update gdb-pending-triggers))))
+ (when (not (member 'gdb-var-update gdb-pending-triggers))
+ (gdb-enqueue-input
+ (list "server interpreter mi \"-var-update *\"\n"
+ 'gdb-var-update-handler))
+ (push 'gdb-var-update gdb-pending-triggers)))
(defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"")
@@ -522,13 +518,9 @@ Also display the main routine in the disassembly buffer if present."
(let ((varnum (match-string 1)))
(gdb-enqueue-input
(list
- (if (with-current-buffer gud-comint-buffer
- (eq gud-minor-mode 'gdba))
- (concat "server interpreter mi \"-var-evaluate-expression "
- varnum "\"\n")
- (concat "-var-evaluate-expression " varnum "\n"))
- `(lambda () (gdb-var-evaluate-expression-handler
- ,varnum t)))))))
+ (concat "server interpreter mi \"-var-evaluate-expression "
+ varnum "\"\n")
+ `(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers))
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
@@ -544,9 +536,10 @@ Also display the main routine in the disassembly buffer if present."
(speedbar-timer-fn)))
(defun gdb-var-delete ()
- "Delete watched expression from the speedbar."
+ "Delete watch expression at point from the speedbar."
(interactive)
- (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
+ (if (with-current-buffer
+ gud-comint-buffer (memq gud-minor-mode '(gdbmi gdba)))
(let ((text (speedbar-line-text)))
(string-match "\\(\\S-+\\)" text)
(let* ((expr (match-string 1 text))
@@ -595,7 +588,9 @@ INDENT is the current indentation depth."
(cond ((string-match "+" text) ;expand this node
(if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
(gdb-var-list-children token)
- (gdbmi-var-list-children token)))
+ (progn
+ (gdbmi-var-update)
+ (gdbmi-var-list-children token))))
((string-match "-" text) ;contract this node
(dolist (var gdb-var-list)
(if (string-match (concat token "\\.") (nth 1 var))