comparison lisp/progmodes/gdb-ui.el @ 79261:9963a1e6e29f

(gdb-delete-out-of-scope): New option. (gdb-var-update-handler-1): Use it.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 30 Oct 2007 05:37:34 +0000
parents ef2bf5b448b2
children 7420ede9df33 d3e87ee5aa0e
comparison
equal deleted inserted replaced
79260:379c739aa3c5 79261:9963a1e6e29f
944 (defcustom gdb-max-children 40 944 (defcustom gdb-max-children 40
945 "Maximum number of children before expansion requires confirmation." 945 "Maximum number of children before expansion requires confirmation."
946 :type 'integer 946 :type 'integer
947 :group 'gud 947 :group 'gud
948 :version "22.1") 948 :version "22.1")
949
950 (defcustom gdb-delete-out-of-scope t
951 "If non-nil delete watch expressions automatically when they go out of scope."
952 :type 'boolean
953 :group 'gud
954 :version "22.2")
949 955
950 (defun gdb-speedbar-expand-node (text token indent) 956 (defun gdb-speedbar-expand-node (text token indent)
951 "Expand the node the user clicked on. 957 "Expand the node the user clicked on.
952 TEXT is the text of the button we clicked on, a + or - item. 958 TEXT is the text of the button we clicked on, a + or - item.
953 TOKEN is data related to this node. 959 TOKEN is data related to this node.
3513 (let* ((varnum (match-string 1)) 3519 (let* ((varnum (match-string 1))
3514 (var (assoc varnum gdb-var-list))) 3520 (var (assoc varnum gdb-var-list)))
3515 (when var 3521 (when var
3516 (let ((match (match-string 3))) 3522 (let ((match (match-string 3)))
3517 (cond ((string-equal match "false") 3523 (cond ((string-equal match "false")
3518 (setcar (nthcdr 5 var) 'out-of-scope)) 3524 (if gdb-delete-out-of-scope
3525 (gdb-var-delete-1 varnum)
3526 (setcar (nthcdr 5 var) 'out-of-scope)))
3519 ((string-equal match "true") 3527 ((string-equal match "true")
3520 (setcar (nthcdr 5 var) 'changed) 3528 (setcar (nthcdr 5 var) 'changed)
3521 (setcar (nthcdr 4 var) 3529 (setcar (nthcdr 4 var)
3522 (read (match-string 2)))) 3530 (read (match-string 2))))
3523 ((string-equal match "invalid") 3531 ((string-equal match "invalid")