Mercurial > emacs
comparison lisp/gdb-ui.el @ 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 | 04628db4db1a |
children | 9a40de6a1802 |
comparison
equal
deleted
inserted
replaced
51786:6b9f555f9278 | 51787:10f90558dc89 |
---|---|
176 ;; | 176 ;; |
177 (if (eq window-system 'w32) | 177 (if (eq window-system 'w32) |
178 (gdb-enqueue-input (list "set new-console off\n" 'ignore))) | 178 (gdb-enqueue-input (list "set new-console off\n" 'ignore))) |
179 (gdb-enqueue-input (list "set height 0\n" 'ignore)) | 179 (gdb-enqueue-input (list "set height 0\n" 'ignore)) |
180 ;; find source file and compilation directory here | 180 ;; find source file and compilation directory here |
181 (gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program | 181 (gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program |
182 (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program | 182 (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program |
183 (gdb-enqueue-input (list "server info source\n" | 183 (gdb-enqueue-input (list "server info source\n" 'gdb-source-info)) |
184 'gdb-source-info)) | |
185 ;; | 184 ;; |
186 (run-hooks 'gdba-mode-hook)) | 185 (run-hooks 'gdba-mode-hook)) |
187 | 186 |
188 (defun gud-display () | 187 (defun gud-display () |
189 "Auto-display (possibly dereferenced) C expression at point." | 188 "Auto-display (possibly dereferenced) C expression at point." |
2083 (gdb-display-stack-buffer) | 2082 (gdb-display-stack-buffer) |
2084 (delete-other-windows) | 2083 (delete-other-windows) |
2085 (gdb-display-breakpoints-buffer) | 2084 (gdb-display-breakpoints-buffer) |
2086 (gdb-display-display-buffer) | 2085 (gdb-display-display-buffer) |
2087 (delete-other-windows) | 2086 (delete-other-windows) |
2087 (switch-to-buffer gud-comint-buffer) | |
2088 (split-window nil ( / ( * (window-height) 3) 4)) | 2088 (split-window nil ( / ( * (window-height) 3) 4)) |
2089 (split-window nil ( / (window-height) 3)) | 2089 (split-window nil ( / (window-height) 3)) |
2090 (split-window-horizontally) | 2090 (split-window-horizontally) |
2091 (other-window 1) | 2091 (other-window 1) |
2092 (switch-to-buffer (gdb-locals-buffer-name)) | 2092 (switch-to-buffer (gdb-locals-buffer-name)) |
2181 (search-forward "Located in ") | 2181 (search-forward "Located in ") |
2182 (looking-at "\\S-*") | 2182 (looking-at "\\S-*") |
2183 (setq gdb-main-file (match-string 0))) | 2183 (setq gdb-main-file (match-string 0))) |
2184 (setq gdb-view-source nil)) | 2184 (setq gdb-view-source nil)) |
2185 (delete-other-windows) | 2185 (delete-other-windows) |
2186 (switch-to-buffer gud-comint-buffer) | |
2186 (if gdb-many-windows | 2187 (if gdb-many-windows |
2187 (gdb-setup-windows) | 2188 (gdb-setup-windows) |
2188 (gdb-display-breakpoints-buffer) | 2189 (gdb-display-breakpoints-buffer) |
2189 (gdb-display-display-buffer) | 2190 (gdb-display-display-buffer) |
2190 (delete-other-windows) | 2191 (delete-other-windows) |
2191 (split-window) | 2192 (split-window) |
2192 (other-window 1) | 2193 (other-window 1) |
2193 (if gdb-view-source | 2194 (if gdb-view-source |
2194 (switch-to-buffer (gud-find-file gdb-main-file)) | 2195 (switch-to-buffer |
2196 (if gud-last-last-frame | |
2197 (gud-find-file (car gud-last-last-frame)) | |
2198 (gud-find-file gdb-main-file))) | |
2195 (switch-to-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)) | 2199 (switch-to-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)) |
2196 (gdb-invalidate-assembler)) | 2200 (gdb-invalidate-assembler)) |
2197 (setq gdb-source-window (get-buffer-window (current-buffer))) | 2201 (setq gdb-source-window (get-buffer-window (current-buffer))) |
2198 (other-window 1))) | 2202 (other-window 1))) |
2199 | 2203 |