summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2005-03-07 01:55:18 +0000
committerNick Roberts <nickrob@snap.net.nz>2005-03-07 01:55:18 +0000
commitbd7a628ab6ce821cd88e04f04d8f6e5c7a5c30b8 (patch)
treeadbfa9a6d54591ab4933032a011a23d67df42764 /lisp/progmodes/gdb-ui.el
parent3d182f9d1a0f932f564ae7f6acdd477a26a46cb2 (diff)
downloademacs-bd7a628ab6ce821cd88e04f04d8f6e5c7a5c30b8.tar.gz
emacs-bd7a628ab6ce821cd88e04f04d8f6e5c7a5c30b8.tar.bz2
emacs-bd7a628ab6ce821cd88e04f04d8f6e5c7a5c30b8.zip
(gdb-var-create-handler): Handle just MI case.
(gdb-send, gdb-send-item): Log items sent from gdb-send too.
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r--lisp/progmodes/gdb-ui.el23
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index e300b36457b..a040395acb9 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -341,8 +341,12 @@ detailed description of this mode.
(speedbar 1)
(if (equal (nth 2 var) "0")
(gdb-enqueue-input
- (list (concat "server interpreter mi \"-var-evaluate-expression "
- (nth 1 var) "\"\n")
+ (list
+ (if (with-current-buffer
+ gud-comint-buffer (eq gud-minor-mode 'gdba))
+ (concat "server interpreter mi \"-var-evaluate-expression "
+ (nth 1 var) "\"\n")
+ (concat "-var-evaluate-expression " (nth 1 var) "\n"))
`(lambda () (gdb-var-evaluate-expression-handler
,(nth 1 var) nil))))
(setq gdb-var-changed t)))
@@ -368,8 +372,8 @@ detailed description of this mode.
(defun gdb-var-list-children (varnum)
(gdb-enqueue-input
- (list (concat "server interpreter mi \"-var-list-children " varnum "\"\n")
- `(lambda () (gdb-var-list-children-handler ,varnum)))))
+ (list (concat "server interpreter mi \"-var-list-children " varnum "\"\n")
+ `(lambda () (gdb-var-list-children-handler ,varnum)))))
(defconst gdb-var-list-children-regexp
"name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"")
@@ -674,9 +678,12 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
(defun gdb-send (proc string)
"A comint send filter for gdb.
This filter may simply queue input for a later time."
- (if gud-running
- (process-send-string proc (concat string "\n"))
- (gdb-enqueue-input (concat string "\n"))))
+ (let ((item (concat string "\n")))
+ (if gud-running
+ (progn
+ (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
+ (process-send-string proc item))
+ (gdb-enqueue-input item))))
;; Note: Stuff enqueued here will be sent to the next prompt, even if it
;; is a query, or other non-top-level prompt.
@@ -697,7 +704,7 @@ This filter may simply queue input for a later time."
(defun gdb-send-item (item)
(setq gdb-flush-pending-output nil)
- (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
+ (if gdb-enable-debug-log (push (cons 'send-item item) gdb-debug-log))
(setq gdb-current-item item)
(with-current-buffer gud-comint-buffer
(if (eq gud-minor-mode 'gdba)