From 7a7b20311c3afcb43bca06e5b3ce7775ec74af39 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 7 Jul 2003 18:53:42 +0000 Subject: [PATCH] (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. --- lisp/gdb-ui.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/gdb-ui.el b/lisp/gdb-ui.el index 816cbda4818..6aec82c9877 100644 --- a/lisp/gdb-ui.el +++ b/lisp/gdb-ui.el @@ -178,10 +178,9 @@ The following interactive lisp functions help control operation : (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 @@ the source buffer." (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 @@ buffers." (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 @@ buffers." (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))) -- 2.39.2