# HG changeset patch # User Nick Roberts # Date 1140177098 0 # Node ID 87bf1f965a0f65de85e3f9e208ca959f556e0ccc # Parent c0cb4d23d9c95e627585627ee68aa15b72e5cb69 (gdb-var-list): Update doc string. (gdb-init-1, gdb-var-changed): Set gdb-var-changed to t initially. (gdb-show-changed-values): Also use for out of scope variables. (gdb-var-update-handler-1): Note if variable goes out of scope. diff -r c0cb4d23d9c9 -r 87bf1f965a0f lisp/progmodes/gdb-ui.el --- a/lisp/progmodes/gdb-ui.el Fri Feb 17 11:50:48 2006 +0000 +++ b/lisp/progmodes/gdb-ui.el Fri Feb 17 11:51:38 2006 +0000 @@ -107,8 +107,9 @@ (defvar gdb-current-language nil) (defvar gdb-var-list nil "List of variables in watch window. -Each element has the form (EXPRESSION VARNUM NUMCHILD TYPE VALUE CHANGED-P).") -(defvar gdb-var-changed nil "Non-nil means that `gdb-var-list' has changed.") +Each element has the form (EXPRESSION VARNUM NUMCHILD TYPE VALUE STATUS) where +STATUS is nil (unchanged), `changed' or `out-of-scope'.") +(defvar gdb-var-changed t "Non-nil means that `gdb-var-list' has changed.") (defvar gdb-main-file nil "Source file from which program execution begins.") (defvar gdb-overlay-arrow-position nil) (defvar gdb-server-prefix nil) @@ -454,7 +455,8 @@ gdb-current-language nil gdb-frame-number nil gdb-var-list nil - gdb-var-changed nil + ;; Set initially to t to force update. + gdb-var-changed t gdb-first-post-prompt t gdb-prompting nil gdb-input-queue nil @@ -739,8 +741,9 @@ 'ignore)))) (defcustom gdb-show-changed-values t - "If non-nil highlight values that have recently changed in the speedbar. -The highlighting is done with `font-lock-warning-face'." + "If non-nil change the face of out of scope variables and changed values. +Out of scope variables are suppressed with `shadow' face. +Changed values are highlighted with the face `font-lock-warning-face'." :type 'boolean :group 'gud :version "22.1") @@ -3049,11 +3052,11 @@ (dolist (var gdb-var-list) (if (string-equal varnum (cadr var)) (progn - (setcar (nthcdr 5 var) t) - (setcar (nthcdr 4 var) - (if (string-equal (match-string 3) "true") - (read (match-string 2)) - "*changed*")) + (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)))) (setcar (nthcdr num gdb-var-list) var) (throw 'var-found1 nil))) (setq num (+ num 1))))))