]> git.eshelyaron.com Git - emacs.git/commitdiff
(gdb-breakpoint-regexp): Declare earlier to
authorNick Roberts <nickrob@snap.net.nz>
Sun, 28 Jan 2007 09:42:23 +0000 (09:42 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Sun, 28 Jan 2007 09:42:23 +0000 (09:42 +0000)
avoid compiler warning.
(gdb-var-update-handler-1): Consider that the MI field `in_scope'
might have values other than "true" or "false".

lisp/progmodes/gdb-ui.el

index 01e4fe7abe781d07a7f44f5a81a865ce0d9d423d..c2811a9658a505037a493765f96456f1423897dc 100644 (file)
@@ -1788,6 +1788,9 @@ static char *magick[] = {
   "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 @@ static char *magick[] = {
       '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 @@ in_scope=\"\\(.*?\\)\".*?}")
     (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.
 ;;