]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/gdb-ui.el
(gdb-many-windows): Doc fix (Nil -> nil).
[gnu-emacs] / lisp / progmodes / gdb-ui.el
index 3f21e4ac96b7bf8ce9381bcd8960ada223dfcc97..be2b99c897553004c34338f38b0c6040e046c654 100644 (file)
@@ -312,7 +312,7 @@ Also display the main routine in the disassembly buffer if present."
   :version "22.1")
 
 (defcustom gdb-many-windows nil
-  "Nil means just pop up the GUD buffer unless `gdb-show-main' is t.
+  "nil means just pop up the GUD buffer unless `gdb-show-main' is t.
 In this case it starts with two windows: one displaying the GUD
 buffer and the other with the source file with the main routine
 of the debugged program.  Non-nil means display the layout shown for
@@ -902,20 +902,23 @@ Changed values are highlighted with the face `font-lock-warning-face'."
 TEXT is the text of the button we clicked on, a + or - item.
 TOKEN is data related to this node.
 INDENT is the current indentation depth."
-  (cond ((string-match "+" text)        ;expand this node
-        (if (and
-             (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-             (string-equal gdb-version "pre-6.4"))
-            (gdb-var-list-children token)
-          (gdb-var-list-children-1 token)))
-       ((string-match "-" text)        ;contract this node
-        (dolist (var gdb-var-list)
-          (if (string-match (concat token "\\.") (car var))
-              (setq gdb-var-list (delq var gdb-var-list))))
-        (speedbar-change-expand-button-char ?+)
-        (speedbar-delete-subblock indent))
-       (t (error "Ooops...  not sure what to do")))
-  (speedbar-center-buffer-smartly))
+  (if (and gud-comint-buffer (buffer-name gud-comint-buffer))
+      (progn
+       (cond ((string-match "+" text)  ;expand this node
+              (if (and (eq (buffer-local-value
+                            'gud-minor-mode gud-comint-buffer) 'gdba)
+                       (string-equal gdb-version "pre-6.4"))
+                  (gdb-var-list-children token)
+                (gdb-var-list-children-1 token)))
+             ((string-match "-" text)  ;contract this node
+              (dolist (var gdb-var-list)
+                (if (string-match (concat token "\\.") (car var))
+                    (setq gdb-var-list (delq var gdb-var-list))))
+              (speedbar-change-expand-button-char ?+)
+              (speedbar-delete-subblock indent))
+             (t (error "Ooops...  not sure what to do")))
+       (speedbar-center-buffer-smartly))
+    (message-box "GUD session has been killed")))
 
 (defun gdb-get-target-string ()
   (with-current-buffer gud-comint-buffer
@@ -1132,7 +1135,7 @@ This filter may simply queue input for a later time."
       (if gdb-prompting
          (progn
            (gdb-send-item item)
-       (setq gdb-prompting nil))
+           (setq gdb-prompting nil))
        (push item gdb-input-queue))))
 
 (defun gdb-dequeue-input ()
@@ -2045,7 +2048,6 @@ static char *magick[] = {
                      (or gdb-stack-position
                          (setq gdb-stack-position (make-marker)))
                      (set-marker gdb-stack-position (point)))
-                 (set-marker gdb-stack-position nil)
                  (put-text-property bl (+ bl 4)
                                     'face '(:inverse-video t))))
              (when (re-search-forward