changeset 51787:10f90558dc89

(gdb-source-info): Display current frame when attaching to an existing process. (gdb-setup-windows, gdb-source-info): Start with gud-comint-buffer while laying out windows when attaching to an existing process.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 07 Jul 2003 18:53:42 +0000
parents 6b9f555f9278
children 43d663a05e2d
files lisp/gdb-ui.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gdb-ui.el	Mon Jul 07 18:52:23 2003 +0000
+++ b/lisp/gdb-ui.el	Mon Jul 07 18:53:42 2003 +0000
@@ -178,10 +178,9 @@
       (gdb-enqueue-input (list "set new-console off\n" 'ignore)))
   (gdb-enqueue-input (list "set height 0\n" 'ignore))
   ;; find source file and compilation directory here
-  (gdb-enqueue-input (list "server list main\n" 'ignore))     ; C program
+  (gdb-enqueue-input (list "server list main\n"   'ignore))   ; C program
   (gdb-enqueue-input (list "server list MAIN__\n" 'ignore))   ; Fortran program
-  (gdb-enqueue-input (list "server info source\n"
-			   'gdb-source-info))
+  (gdb-enqueue-input (list "server info source\n" 'gdb-source-info))
   ;;
   (run-hooks 'gdba-mode-hook))
 
@@ -2085,6 +2084,7 @@
   (gdb-display-breakpoints-buffer)
   (gdb-display-display-buffer)
   (delete-other-windows)
+  (switch-to-buffer gud-comint-buffer)
   (split-window nil ( / ( * (window-height) 3) 4))
   (split-window nil ( / (window-height) 3))
   (split-window-horizontally)
@@ -2183,6 +2183,7 @@
 	(setq gdb-main-file (match-string 0)))
     (setq gdb-view-source nil))
   (delete-other-windows)
+  (switch-to-buffer gud-comint-buffer)
   (if gdb-many-windows
       (gdb-setup-windows)
     (gdb-display-breakpoints-buffer)
@@ -2191,7 +2192,10 @@
     (split-window)
     (other-window 1)
     (if gdb-view-source
-	(switch-to-buffer (gud-find-file gdb-main-file))
+      (switch-to-buffer
+       (if gud-last-last-frame
+	   (gud-find-file (car gud-last-last-frame))
+	 (gud-find-file gdb-main-file)))
       (switch-to-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))
       (gdb-invalidate-assembler))
     (setq gdb-source-window (get-buffer-window (current-buffer)))