emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el,v


From: Nick Roberts
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el,v
Date: Mon, 04 Dec 2006 03:26:45 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Nick Roberts <nickrob>  06/12/04 03:26:45

Index: gdb-ui.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/gdb-ui.el,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -b -r1.191 -r1.192
--- gdb-ui.el   10 Nov 2006 09:38:11 -0000      1.191
+++ gdb-ui.el   4 Dec 2006 03:26:44 -0000       1.192
@@ -40,8 +40,8 @@
 ;; This file has evolved from gdba.el that was included with GDB 5.0 and
 ;; written by Tom Lord and Jim Kingdon.  It uses GDB's annotation interface.
 ;; You don't need to know about annotations to use this mode as a debugger,
-;; but if you are interested developing the mode itself, then see the
-;; Annotations section in the GDB info manual.
+;; but if you are interested developing the mode itself, see the Annotations
+;; section in the GDB info manual.
 
 ;; GDB developers plan to make the annotation interface obsolete.  A new
 ;; interface called GDB/MI (machine interface) has been designed to replace
@@ -51,9 +51,9 @@
 ;; still under development and is part of a process to migrate Emacs from
 ;; annotations to GDB/MI.
 
-;; This mode SHOULD WORK WITH GDB 5.0 onwards but you will NEED GDB 6.0
-;; onwards to use watch expressions.  It works best with GDB 6.4 where
-;; watch expressions will update more quickly.
+;; This mode SHOULD WORK WITH GDB 5.0 or later but you will NEED AT LEAST
+;; GDB 6.0 to use watch expressions.  It works best with GDB 6.4 or later
+;; where watch expressions will update more quickly.
 
 ;;; Windows Platforms:
 
@@ -81,12 +81,14 @@
 ;;    "gdb --annotate=2 myprog" to keep source buffer/selected frame fixed.
 
 ;;; Problems with watch expressions, GDB/MI:
+
 ;; 1) They go out of scope when the inferior is re-run.
 ;; 2) -stack-list-locals has a type field but also prints type in values field.
 ;; 3) VARNUM increments even when variable object is not created
 ;;    (maybe trivial).
 
 ;;; TODO:
+
 ;; 1) Use MI command -data-read-memory for memory window.
 ;; 2) Use tree-widget.el instead of the speedbar for watch-expressions?
 ;; 3) Mark breakpoint locations on scroll-bar of source buffer?
@@ -871,6 +873,14 @@
              (if (string-match (concat (car var) "\\.") (car varchild))
                  (setq gdb-var-list (delq varchild gdb-var-list)))))))))
 
+(defun gdb-var-delete-children (varnum)
+  "Delete children of variable object point from the speedbar."
+  (gdb-enqueue-input
+   (list
+    (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
+       (concat "server interpreter mi \"-var-delete -c " varnum "\"\n")
+      (concat "-var-delete -c " varnum "\n")) 'ignore)))
+
 (defun gdb-edit-value (text token indent)
   "Assign a value to a variable displayed in the speedbar."
   (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
@@ -914,6 +924,7 @@
               (dolist (var gdb-var-list)
                 (if (string-match (concat token "\\.") (car var))
                     (setq gdb-var-list (delq var gdb-var-list))))
+              (gdb-var-delete-children token)
               (speedbar-change-expand-button-char ?+)
               (speedbar-delete-subblock indent))
              (t (error "Ooops...  not sure what to do")))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]