changeset 75480:72227336f162

(gdb-breakpoint-regexp): Declare earlier to avoid compiler warning. (gdb-var-update-handler-1): Consider that the MI field `in_scope' might have values other than "true" or "false".
author Nick Roberts <nickrob@snap.net.nz>
date Sun, 28 Jan 2007 09:42:23 +0000
parents 20e63814712b
children 2a056be108df
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 23 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Sun Jan 28 09:41:48 2007 +0000
+++ b/lisp/progmodes/gdb-ui.el	Sun Jan 28 09:42:23 2007 +0000
@@ -1788,6 +1788,9 @@
   "Face for disabled breakpoint icon in fringe."
   :group 'gud)
 
+(defconst gdb-breakpoint-regexp
+  "\\([0-9]+\\).*?\\(?:point\\|catch\\s-+\\S-+\\)\\s-+\\S-+\\s-+\\(.\\)\\s-+")
+
 ;; Put breakpoint icons in relevant margins (even those set in the GUD buffer).
 (defun gdb-info-breakpoints-custom ()
   (let ((flag) (bptno))
@@ -1981,9 +1984,6 @@
       'gdb-invalidate-breakpoints
     'gdbmi-invalidate-breakpoints))
 
-(defconst gdb-breakpoint-regexp
-  "\\([0-9]+\\).*?\\(?:point\\|catch\\s-+\\S-+\\)\\s-+\\S-+\\s-+\\(.\\)\\s-+")
-
 (defun gdb-toggle-breakpoint ()
   "Enable/disable breakpoint at current line."
   (interactive)
@@ -3436,14 +3436,26 @@
     (let* ((varnum (match-string 1))
 	   (var (assoc varnum gdb-var-list)))
       (when var
-	(if (string-equal (match-string 3) "false")
-	    (setcar (nthcdr 5 var) 'out-of-scope)
-	  (setcar (nthcdr 5 var) 'changed)
-	  (setcar (nthcdr 4 var)
-		  (read (match-string 2)))))))
-  (setq gdb-pending-triggers
-   (delq 'gdb-var-update gdb-pending-triggers))
-  (gdb-speedbar-update))
+	(let ((match (match-string 3)))
+	  (cond ((string-equal match "false")
+		 (setcar (nthcdr 5 var) 'out-of-scope))
+		((string-equal match "true")
+		 (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)))
+		)))))
+      (setq gdb-pending-triggers
+	    (delq 'gdb-var-update gdb-pending-triggers))
+      (gdb-speedbar-update))
 
 ;; Registers buffer.
 ;;