diff lisp/progmodes/gdb-ui.el @ 90116:29e773288013

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-23 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 (patch 150-165) - Update from CVS - Merge from gnus--rel--5.10 - Add info/dir to arch branch * miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 34-37) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 09 Mar 2005 00:09:34 +0000
parents e4694597cbf4 2b7513e741b1
children e330fedc9152
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Tue Mar 08 08:37:20 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Wed Mar 09 00:09:34 2005 +0000
@@ -341,8 +341,12 @@
 	  (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 @@
 
 (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 @@
 (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 @@
 
 (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)