summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2004-05-24 21:59:08 +0000
committerNick Roberts <nickrob@snap.net.nz>2004-05-24 21:59:08 +0000
commitef78535ce8cbd48c34d117f7e011434a1fa3a5b7 (patch)
treef85c9b352a66b6fa3e277d0f11c4df53c7bc06ec /lisp/progmodes
parent0b46dcf077e6791c168fd4f153b0363b7d66e4c8 (diff)
downloademacs-ef78535ce8cbd48c34d117f7e011434a1fa3a5b7.tar.gz
(gdb-var-update, gdb-var-update-handler, gdb-var-delete)
(gdb-edit-value, gdb-speedbar-expand-node): Handle new value for gud-minor-mode (gdbmi).
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/gdb-ui.el31
1 files changed, 23 insertions, 8 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index b376c380e98..6fce273f6ee 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -319,7 +319,11 @@ speedbar."
(defun gdb-var-update ()
(if (not (member 'gdb-var-update gdb-pending-triggers))
(progn
- (gdb-enqueue-input (list "server interpreter mi \"-var-update *\"\n"
+ (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))))
@@ -331,8 +335,11 @@ speedbar."
(while (re-search-forward gdb-var-update-regexp nil t)
(let ((varnum (match-string 1)))
(gdb-enqueue-input
- (list (concat "server interpreter mi \"-var-evaluate-expression "
- varnum "\"\n")
+ (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)))))))
(setq gdb-pending-triggers
@@ -349,8 +356,11 @@ speedbar."
(varnum (cadr var)))
(unless (string-match "\\." varnum)
(gdb-enqueue-input
- (list (concat "server interpreter mi \"-var-delete "
- varnum "\"\n")
+ (list
+ (if (with-current-buffer gud-comint-buffer
+ (eq gud-minor-mode 'gdba))
+ (concat "server interpreter mi \"-var-delete " varnum "\"\n")
+ (concat "-var-delete " varnum "\n"))
'ignore))
(setq gdb-var-list (delq var gdb-var-list))
(dolist (varchild gdb-var-list)
@@ -364,8 +374,11 @@ speedbar."
(varnum (cadr var)) (value))
(setq value (read-string "New value: "))
(gdb-enqueue-input
- (list (concat "server interpreter mi \"-var-assign "
- varnum " " value "\"\n")
+ (list
+ (if (with-current-buffer gud-comint-buffer
+ (eq gud-minor-mode 'gdba))
+ (concat "server interpreter mi \"-var-assign " varnum " " value "\"\n")
+ (concat "-var-assign " varnum " " value "\n"))
'ignore))))
(defcustom gdb-show-changed-values t
@@ -380,7 +393,9 @@ TEXT is the text of the button we clicked on, a + or - item.
TOKEN is data related to this node.
INDENT is the current indentation depth."
(cond ((string-match "+" text) ;expand this node
- (gdb-var-list-children token))
+ (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
+ (gdb-var-list-children token)
+ (gdbmi-var-list-children token)))
((string-match "-" text) ;contract this node
(dolist (var gdb-var-list)
(if (string-match (concat token "\\.") (nth 1 var))