Commit df78c9e3 authored by Nick Roberts's avatar Nick Roberts
Browse files

(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.
parent 83318a6d
......@@ -1031,12 +1031,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(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 @@ With arg, enter name of variable to be watched in the minibuffer."
(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 @@ numchild=\"\\(.+?\\)\".*?,value=\\(\".*?\"\\).*?,type=\"\\(.+?\\)\".*?}")
(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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment