From 5754d11f61a8495c71fc5c666d926aff87095183 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 28 Jan 2007 09:42:23 +0000 Subject: [PATCH] (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". --- lisp/progmodes/gdb-ui.el | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 01e4fe7abe7..c2811a9658a 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -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. ;; -- 2.39.2