diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2007-01-30 22:07:12 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2007-01-30 22:07:12 +0000 |
commit | 01b8fc600aa254ebffdcc107570f8af3a3e347e4 (patch) | |
tree | b3ba1df735fc79efb842e6979e0b3d1749d181d4 /lisp/progmodes/gdb-ui.el | |
parent | 8af39ffbb3d34d7ebc35ed025a466f3157e37f9c (diff) | |
download | emacs-01b8fc600aa254ebffdcc107570f8af3a3e347e4.tar.gz |
(gdb-var-delete-1): New function.
(gdb-var-delete): Use it.
(gdb-var-update-handler-1): Handle value "invalid" for MI field
`in_scope'.
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r-- | lisp/progmodes/gdb-ui.el | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index c2811a9658a..c4cd96010a6 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -848,6 +848,19 @@ type_changed=\".*?\".*?}") (setq gdb-pending-triggers (delq 'gdb-var-update gdb-pending-triggers))) +(defun gdb-var-delete-1 (varnum) + (gdb-enqueue-input + (list + (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) + 'gdba) + (concat "server interpreter mi \"-var-delete " varnum "\"\n") + (concat "-var-delete " varnum "\n")) + 'ignore)) + (setq gdb-var-list (delq var gdb-var-list)) + (dolist (varchild gdb-var-list) + (if (string-match (concat (car var) "\\.") (car varchild)) + (setq gdb-var-list (delq varchild gdb-var-list))))) + (defun gdb-var-delete () "Delete watch expression at point from the speedbar." (interactive) @@ -857,17 +870,7 @@ type_changed=\".*?\".*?}") (varnum (car var))) (if (string-match "\\." (car var)) (message-box "Can only delete a root expression") - (gdb-enqueue-input - (list - (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) - 'gdba) - (concat "server interpreter mi \"-var-delete " varnum "\"\n") - (concat "-var-delete " varnum "\n")) - 'ignore)) - (setq gdb-var-list (delq var gdb-var-list)) - (dolist (varchild gdb-var-list) - (if (string-match (concat (car var) "\\.") (car varchild)) - (setq gdb-var-list (delq varchild gdb-var-list)))))))) + (gdb-var-delete-1 varnum))))) (defun gdb-var-delete-children (varnum) "Delete children of variable object at point from the speedbar." @@ -3443,16 +3446,8 @@ in_scope=\"\\(.*?\\)\".*?}") (setcar (nthcdr 5 var) 'changed) (setcar (nthcdr 4 var) (read (match-string 2)))) -;; ((string-equal match "invalid") -;; (gdb-enqueue-input -;; (list -;; (if (eq (buffer-local-value -;; 'gud-minor-mode gud-comint-buffer) 'gdba) -;; (concat "server interpreter mi \"-var-delete " -;; varnum "\"\n") -;; (concat "-var-delete " varnum "\n")) -;; 'ignore))) - ))))) + ((string-equal match "invalid") + (gdb-var-delete-1 varnum))))))) (setq gdb-pending-triggers (delq 'gdb-var-update gdb-pending-triggers)) (gdb-speedbar-update)) |