Mercurial > emacs
changeset 53535:a406177e7f26
(gdba): Avoid duplication, use gdb-ann3. Use GDB
command "set width 0" to prevent word wrapping problems.
(gdb-prompt): Set (renamed) gdb-first-prompt to nil in gdb-ann3.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Wed, 07 Jan 2004 23:21:56 +0000 |
parents | 777201dee99a |
children | 479dc1181cb1 |
files | lisp/gdb-ui.el |
diffstat | 1 files changed, 6 insertions(+), 65 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gdb-ui.el Wed Jan 07 23:21:10 2004 +0000 +++ b/lisp/gdb-ui.el Wed Jan 07 23:21:56 2004 +0000 @@ -116,7 +116,9 @@ ;; ;; Let's start with a basic gud-gdb buffer and then modify it a bit. (gdb command-line) - ;; + (gdb-ann3)) + +(defun gdb-ann3 () (set (make-local-variable 'gud-minor-mode) 'gdba) (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) ;; @@ -160,7 +162,7 @@ (setq gdb-selected-view 'source) (setq gdb-var-list nil) (setq gdb-var-changed nil) - (setq gdb-first-pre-prompt nil) + (setq gdb-first-prompt nil) ;; (mapc 'make-local-variable gdb-variables) (setq gdb-buffer-type 'gdba) @@ -170,6 +172,7 @@ (if (eq window-system 'w32) (gdb-enqueue-input (list "set new-console off\n" 'ignore))) (gdb-enqueue-input (list "set height 0\n" 'ignore)) + (gdb-enqueue-input (list "set width 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)) ; Fortran program @@ -686,9 +689,7 @@ (defun gdb-prompt (ignored) "An annotation handler for `prompt'. This sends the next command (if any) to gdb." - (when gdb-first-pre-prompt - (gdb-ann3) - (setq gdb-first-pre-prompt nil)) + (when gdb-first-prompt (gdb-ann3)) (let ((sink (gdb-get-output-sink))) (cond ((eq sink 'user) t) @@ -708,66 +709,6 @@ (gdb-set-prompting t) (gud-display-frame))))) -(defun gdb-ann3 () - (set (make-local-variable 'gud-minor-mode) 'gdba) - (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) - ;; - (gud-def gud-break (if (not (string-equal mode-name "Machine")) - (gud-call "break %f:%l" arg) - (save-excursion - (beginning-of-line) - (forward-char 2) - (gud-call "break *%a" arg))) - "\C-b" "Set breakpoint at current line or address.") - ;; - (gud-def gud-remove (if (not (string-equal mode-name "Machine")) - (gud-call "clear %f:%l" arg) - (save-excursion - (beginning-of-line) - (forward-char 2) - (gud-call "clear *%a" arg))) - "\C-d" "Remove breakpoint at current line or address.") - ;; - (gud-def gud-until (if (not (string-equal mode-name "Machine")) - (gud-call "until %f:%l" arg) - (save-excursion - (beginning-of-line) - (forward-char 2) - (gud-call "until *%a" arg))) - "\C-u" "Continue to current line or address.") - - (define-key gud-minor-mode-map [left-margin mouse-1] - 'gdb-mouse-toggle-breakpoint) - (define-key gud-minor-mode-map [left-fringe mouse-1] - 'gdb-mouse-toggle-breakpoint) - - (setq comint-input-sender 'gdb-send) - ;; - ;; (re-)initialise - (setq gdb-current-address "main") - (setq gdb-previous-address nil) - (setq gdb-previous-frame nil) - (setq gdb-current-frame "main") - (setq gdb-view-source t) - (setq gdb-selected-view 'source) - (setq gdb-var-list nil) - (setq gdb-var-changed nil) - ;; - (mapc 'make-local-variable gdb-variables) - (setq gdb-buffer-type 'gdba) - ;; - (gdb-clear-inferior-io) - ;; - (if (eq window-system 'w32) - (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)) ; Fortran program - (gdb-enqueue-input (list "server info source\n" 'gdb-source-info)) - ;; - (run-hooks 'gdba-mode-hook)) - (defun gdb-subprompt (ignored) "An annotation handler for non-top-level prompts." (gdb-set-prompting t))