aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-03-07 01:55:18 +0000
committerNick Roberts2005-03-07 01:55:18 +0000
commitbd7a628ab6ce821cd88e04f04d8f6e5c7a5c30b8 (patch)
treeadbfa9a6d54591ab4933032a011a23d67df42764
parent3d182f9d1a0f932f564ae7f6acdd477a26a46cb2 (diff)
downloademacs-bd7a628ab6ce821cd88e04f04d8f6e5c7a5c30b8.tar.gz
emacs-bd7a628ab6ce821cd88e04f04d8f6e5c7a5c30b8.zip
(gdb-var-create-handler): Handle just MI case.
(gdb-send, gdb-send-item): Log items sent from gdb-send too.
-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.
341 (speedbar 1) 341 (speedbar 1)
342 (if (equal (nth 2 var) "0") 342 (if (equal (nth 2 var) "0")
343 (gdb-enqueue-input 343 (gdb-enqueue-input
344 (list (concat "server interpreter mi \"-var-evaluate-expression " 344 (list
345 (nth 1 var) "\"\n") 345 (if (with-current-buffer
346 gud-comint-buffer (eq gud-minor-mode 'gdba))
347 (concat "server interpreter mi \"-var-evaluate-expression "
348 (nth 1 var) "\"\n")
349 (concat "-var-evaluate-expression " (nth 1 var) "\n"))
346 `(lambda () (gdb-var-evaluate-expression-handler 350 `(lambda () (gdb-var-evaluate-expression-handler
347 ,(nth 1 var) nil)))) 351 ,(nth 1 var) nil))))
348 (setq gdb-var-changed t))) 352 (setq gdb-var-changed t)))
@@ -368,8 +372,8 @@ detailed description of this mode.
368 372
369(defun gdb-var-list-children (varnum) 373(defun gdb-var-list-children (varnum)
370 (gdb-enqueue-input 374 (gdb-enqueue-input
371 (list (concat "server interpreter mi \"-var-list-children " varnum "\"\n") 375 (list (concat "server interpreter mi \"-var-list-children " varnum "\"\n")
372 `(lambda () (gdb-var-list-children-handler ,varnum))))) 376 `(lambda () (gdb-var-list-children-handler ,varnum)))))
373 377
374(defconst gdb-var-list-children-regexp 378(defconst gdb-var-list-children-regexp
375 "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"") 379 "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"")
@@ -674,9 +678,12 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
674(defun gdb-send (proc string) 678(defun gdb-send (proc string)
675 "A comint send filter for gdb. 679 "A comint send filter for gdb.
676This filter may simply queue input for a later time." 680This filter may simply queue input for a later time."
677 (if gud-running 681 (let ((item (concat string "\n")))
678 (process-send-string proc (concat string "\n")) 682 (if gud-running
679 (gdb-enqueue-input (concat string "\n")))) 683 (progn
684 (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
685 (process-send-string proc item))
686 (gdb-enqueue-input item))))
680 687
681;; Note: Stuff enqueued here will be sent to the next prompt, even if it 688;; Note: Stuff enqueued here will be sent to the next prompt, even if it
682;; is a query, or other non-top-level prompt. 689;; is a query, or other non-top-level prompt.
@@ -697,7 +704,7 @@ This filter may simply queue input for a later time."
697 704
698(defun gdb-send-item (item) 705(defun gdb-send-item (item)
699 (setq gdb-flush-pending-output nil) 706 (setq gdb-flush-pending-output nil)
700 (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) 707 (if gdb-enable-debug-log (push (cons 'send-item item) gdb-debug-log))
701 (setq gdb-current-item item) 708 (setq gdb-current-item item)
702 (with-current-buffer gud-comint-buffer 709 (with-current-buffer gud-comint-buffer
703 (if (eq gud-minor-mode 'gdba) 710 (if (eq gud-minor-mode 'gdba)