diff options
| author | Nick Roberts | 2003-07-28 19:49:30 +0000 |
|---|---|---|
| committer | Nick Roberts | 2003-07-28 19:49:30 +0000 |
| commit | 28f016330978a75c16acbd5c2cdc5183dd46528e (patch) | |
| tree | 2b5e744b77db8b9aca9395a1d144d2e6f2e86fe2 | |
| parent | d4243b9dce68a81fa6f9d85e817706b084a9983c (diff) | |
| download | emacs-28f016330978a75c16acbd5c2cdc5183dd46528e.tar.gz emacs-28f016330978a75c16acbd5c2cdc5183dd46528e.zip | |
(gdb-setup-windows, gdb-restore-windows): Restore
assembler in source window if that is what has been selected.
(menu): Add gdb-restore-windows to menu. Make gdba
specific menus only visible from gdba.
| -rw-r--r-- | lisp/gdb-ui.el | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/lisp/gdb-ui.el b/lisp/gdb-ui.el index 6aec82c9877..08d5e901c73 100644 --- a/lisp/gdb-ui.el +++ b/lisp/gdb-ui.el | |||
| @@ -558,9 +558,6 @@ This filter may simply queue output for a later time." | |||
| 558 | ("field-end" gdb-field-end) | 558 | ("field-end" gdb-field-end) |
| 559 | ) "An assoc mapping annotation tags to functions which process them.") | 559 | ) "An assoc mapping annotation tags to functions which process them.") |
| 560 | 560 | ||
| 561 | (defun gdb-ignore-annotation (args) | ||
| 562 | nil) | ||
| 563 | |||
| 564 | (defconst gdb-source-spec-regexp | 561 | (defconst gdb-source-spec-regexp |
| 565 | "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)") | 562 | "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)") |
| 566 | 563 | ||
| @@ -2002,11 +1999,6 @@ the source buffer." | |||
| 2002 | 1999 | ||
| 2003 | ;;; Shared keymap initialization: | 2000 | ;;; Shared keymap initialization: |
| 2004 | 2001 | ||
| 2005 | (define-key gud-menu-map [gdb-many-windows] | ||
| 2006 | (menu-bar-make-toggle gdb-many-windows gdb-many-windows | ||
| 2007 | "Display other windows" "Many Windows %s" | ||
| 2008 | "Display locals, stack and breakpoint information")) | ||
| 2009 | |||
| 2010 | (let ((menu (make-sparse-keymap "GDB-Frames"))) | 2002 | (let ((menu (make-sparse-keymap "GDB-Frames"))) |
| 2011 | (define-key gud-menu-map [frames] | 2003 | (define-key gud-menu-map [frames] |
| 2012 | `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) | 2004 | `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) |
| @@ -2034,7 +2026,8 @@ the source buffer." | |||
| 2034 | ) | 2026 | ) |
| 2035 | 2027 | ||
| 2036 | (let ((menu (make-sparse-keymap "View"))) | 2028 | (let ((menu (make-sparse-keymap "View"))) |
| 2037 | (define-key gud-menu-map [view] `(menu-item "View" ,menu)) | 2029 | (define-key gud-menu-map [view] |
| 2030 | `(menu-item "View" ,menu :visible (eq gud-minor-mode 'gdba))) | ||
| 2038 | ; (define-key menu [both] '(menu-item "Both" gdb-view-both | 2031 | ; (define-key menu [both] '(menu-item "Both" gdb-view-both |
| 2039 | ; :help "Display both source and assembler" | 2032 | ; :help "Display both source and assembler" |
| 2040 | ; :button (:radio . (eq gdb-selected-view 'both)))) | 2033 | ; :button (:radio . (eq gdb-selected-view 'both)))) |
| @@ -2045,6 +2038,16 @@ the source buffer." | |||
| 2045 | :help "Display source only" | 2038 | :help "Display source only" |
| 2046 | :button (:radio . (eq gdb-selected-view 'source))))) | 2039 | :button (:radio . (eq gdb-selected-view 'source))))) |
| 2047 | 2040 | ||
| 2041 | (let ((menu (make-sparse-keymap "GDB-UI"))) | ||
| 2042 | (define-key gud-menu-map [ui] | ||
| 2043 | `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba))) | ||
| 2044 | (define-key menu [gdb-restore-windows] | ||
| 2045 | '("Restore window layout" . gdb-restore-windows)) | ||
| 2046 | (define-key menu [gdb-many-windows] | ||
| 2047 | (menu-bar-make-toggle gdb-many-windows gdb-many-windows | ||
| 2048 | "Display other windows" "Many Windows %s" | ||
| 2049 | "Display locals, stack and breakpoint information"))) | ||
| 2050 | |||
| 2048 | (defun gdb-frame-gdb-buffer () | 2051 | (defun gdb-frame-gdb-buffer () |
| 2049 | (interactive) | 2052 | (interactive) |
| 2050 | (switch-to-buffer-other-frame | 2053 | (switch-to-buffer-other-frame |
| @@ -2091,7 +2094,8 @@ the source buffer." | |||
| 2091 | (other-window 1) | 2094 | (other-window 1) |
| 2092 | (switch-to-buffer (gdb-locals-buffer-name)) | 2095 | (switch-to-buffer (gdb-locals-buffer-name)) |
| 2093 | (other-window 1) | 2096 | (other-window 1) |
| 2094 | (if gdb-view-source | 2097 | (if (and gdb-view-source |
| 2098 | (eq gdb-selected-view 'source)) | ||
| 2095 | (switch-to-buffer | 2099 | (switch-to-buffer |
| 2096 | (if gud-last-last-frame | 2100 | (if gud-last-last-frame |
| 2097 | (gud-find-file (car gud-last-last-frame)) | 2101 | (gud-find-file (car gud-last-last-frame)) |
| @@ -2136,7 +2140,8 @@ This arrangement depends on the value of `gdb-many-windows'." | |||
| 2136 | (delete-other-windows) | 2140 | (delete-other-windows) |
| 2137 | (split-window) | 2141 | (split-window) |
| 2138 | (other-window 1) | 2142 | (other-window 1) |
| 2139 | (if gdb-view-source | 2143 | (if (and gdb-view-source |
| 2144 | (eq gdb-selected-view 'source)) | ||
| 2140 | (switch-to-buffer | 2145 | (switch-to-buffer |
| 2141 | (if gud-last-last-frame | 2146 | (if gud-last-last-frame |
| 2142 | (gud-find-file (car gud-last-last-frame)) | 2147 | (gud-find-file (car gud-last-last-frame)) |