changeset 104782:7d4483022eb4

(gdb-var-create-handler): Remove redundant MI command -var-evaluate-expression. (gdb-var-list-children-regexp): Update from regexp-1 in gdb-ui.el and tweak for case of string child. (gdb-var-list-children-handler): Update from handler-1 in gdb-ui.el.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 01 Sep 2009 10:18:00 +0000
parents fba3984b43f5
children ddf360111014
files lisp/progmodes/gdb-mi.el
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-mi.el	Tue Sep 01 10:16:44 2009 +0000
+++ b/lisp/progmodes/gdb-mi.el	Tue Sep 01 10:18:00 2009 +0000
@@ -1031,12 +1031,7 @@
 	(speedbar 1)
 	(unless (string-equal
 		 speedbar-initial-expansion-list-name "GUD")
-	  (speedbar-change-initial-expansion-list "GUD"))
-	(gdb-input
-	 (list
-	  (concat "-var-evaluate-expression " (car var))
-	  `(lambda () (gdb-var-evaluate-expression-handler
-		       ,(car var) nil)))))
+	  (speedbar-change-initial-expansion-list "GUD")))
     (message-box "No symbol \"%s\" in current context." expr))))
 
 (defun gdb-speedbar-update ()
@@ -1073,7 +1068,8 @@
 
 (defconst gdb-var-list-children-regexp
   "child={.*?name=\"\\(.+?\\)\".*?,exp=\"\\(.+?\\)\".*?,\
-numchild=\"\\(.+?\\)\".*?,value=\\(\".*?\"\\).*?,type=\"\\(.+?\\)\".*?}")
+numchild=\"\\(.+?\\)\".*?,value=\\(\"\"\\|\".*?[^\\]\"\\)\
+\\(}\\|.*?,\\(type=\"\\(.+?\\)\"\\)?.*?}\\)")
 
 (defun gdb-var-list-children-handler (varnum)
   (goto-char (point-min))
@@ -1087,7 +1083,7 @@
 		(let ((varchild (list (match-string 1)
 				      (match-string 2)
 				      (match-string 3)
-				      (match-string 5)
+				      (match-string 7)
 				      (read (match-string 4))
 				      nil)))
 		  (if (assoc (car varchild) gdb-var-list)