diff options
| author | Nick Roberts | 2005-11-09 10:45:07 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-11-09 10:45:07 +0000 |
| commit | 5ee476765c3e0a86c7c97d60fb0c7b3544e7c1dc (patch) | |
| tree | 41eba432fc7dd02b03f605600620ea7e64e6d53a | |
| parent | 31fa5025bbd4aa40bdbdd4c84b146186ef8b8b61 (diff) | |
| download | emacs-5ee476765c3e0a86c7c97d60fb0c7b3544e7c1dc.tar.gz emacs-5ee476765c3e0a86c7c97d60fb0c7b3544e7c1dc.zip | |
(gud-menu-map): Ensure tool-bar is constant when using the speedbar.
(gdb): New command gud-pp.
(gud-menu-map, gud-tool-bar-map): Put it on the tool bar.
| -rw-r--r-- | lisp/progmodes/gud.el | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index c61f3cf96d2..d6333e7d132 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -125,9 +125,9 @@ Used to grey out relevant togolbar icons.") | |||
| 125 | (easy-mmode-defmap gud-menu-map | 125 | (easy-mmode-defmap gud-menu-map |
| 126 | '(([help] "Info" . gud-goto-info) | 126 | '(([help] "Info" . gud-goto-info) |
| 127 | ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode | 127 | ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode |
| 128 | :enable (and (not emacs-basic-display) | 128 | :enable (and (not emacs-basic-display) |
| 129 | (display-graphic-p) | 129 | (display-graphic-p) |
| 130 | (fboundp 'x-show-tip)) | 130 | (fboundp 'x-show-tip)) |
| 131 | :button (:toggle . gud-tooltip-mode)) | 131 | :button (:toggle . gud-tooltip-mode)) |
| 132 | ([refresh] "Refresh" . gud-refresh) | 132 | ([refresh] "Refresh" . gud-refresh) |
| 133 | ([run] menu-item "Run" gud-run | 133 | ([run] menu-item "Run" gud-run |
| @@ -137,18 +137,21 @@ Used to grey out relevant togolbar icons.") | |||
| 137 | :enable (and (not gud-running) | 137 | :enable (and (not gud-running) |
| 138 | (memq gud-minor-mode '(gdbmi gdba gdb perldb))) | 138 | (memq gud-minor-mode '(gdbmi gdba gdb perldb))) |
| 139 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) | 139 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) |
| 140 | (> (car (window-fringes)) 0)))) | 140 | (> (car (window-fringes |
| 141 | (get-buffer-window (current-buffer))) 0))))) | ||
| 141 | ([remove] menu-item "Remove Breakpoint" gud-remove | 142 | ([remove] menu-item "Remove Breakpoint" gud-remove |
| 142 | :enable (not gud-running) | 143 | :enable (not gud-running) |
| 143 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) | 144 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) |
| 144 | (> (car (window-fringes)) 0)))) | 145 | (> (car (window-fringes |
| 146 | (get-buffer-window (current-buffer))) 0))))) | ||
| 145 | ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak | 147 | ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak |
| 146 | :enable (memq gud-minor-mode | 148 | :enable (memq gud-minor-mode |
| 147 | '(gdbmi gdba gdb sdb xdb bashdb))) | 149 | '(gdbmi gdba gdb sdb xdb bashdb))) |
| 148 | ([break] menu-item "Set Breakpoint" gud-break | 150 | ([break] menu-item "Set Breakpoint" gud-break |
| 149 | :enable (not gud-running) | 151 | :enable (not gud-running) |
| 150 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) | 152 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) |
| 151 | (> (car (window-fringes)) 0)))) | 153 | (> (car (window-fringes |
| 154 | (get-buffer-window (current-buffer))) 0))))) | ||
| 152 | ([up] menu-item "Up Stack" gud-up | 155 | ([up] menu-item "Up Stack" gud-up |
| 153 | :enable (and (not gud-running) | 156 | :enable (and (not gud-running) |
| 154 | (memq gud-minor-mode | 157 | (memq gud-minor-mode |
| @@ -157,6 +160,13 @@ Used to grey out relevant togolbar icons.") | |||
| 157 | :enable (and (not gud-running) | 160 | :enable (and (not gud-running) |
| 158 | (memq gud-minor-mode | 161 | (memq gud-minor-mode |
| 159 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) | 162 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) |
| 163 | ([pp] menu-item "Print the emacs s-expression" gud-pp | ||
| 164 | :enable (and (not gud-running) | ||
| 165 | gdb-active-process) | ||
| 166 | :visible (and (string-equal | ||
| 167 | (buffer-local-value | ||
| 168 | 'gud-target-name gud-comint-buffer) "emacs") | ||
| 169 | (memq gud-minor-mode '(gdbmi gdba)))) | ||
| 160 | ([print*] menu-item "Print Dereference" gud-pstar | 170 | ([print*] menu-item "Print Dereference" gud-pstar |
| 161 | :enable (and (not gud-running) | 171 | :enable (and (not gud-running) |
| 162 | (memq gud-minor-mode '(gdbmi gdba gdb)))) | 172 | (memq gud-minor-mode '(gdbmi gdba gdb)))) |
| @@ -204,6 +214,7 @@ Used to grey out relevant togolbar icons.") | |||
| 204 | (gud-remove . "gud/remove") | 214 | (gud-remove . "gud/remove") |
| 205 | (gud-print . "gud/print") | 215 | (gud-print . "gud/print") |
| 206 | (gud-pstar . "gud/pstar") | 216 | (gud-pstar . "gud/pstar") |
| 217 | (gud-pp . "gud/pp") | ||
| 207 | (gud-watch . "gud/watch") | 218 | (gud-watch . "gud/watch") |
| 208 | (gud-cont . "gud/cont") | 219 | (gud-cont . "gud/cont") |
| 209 | (gud-until . "gud/until") | 220 | (gud-until . "gud/until") |
| @@ -613,6 +624,8 @@ and source-file directory for your debugger." | |||
| 613 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") | 624 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") |
| 614 | (gud-def gud-pstar "print* %e" nil | 625 | (gud-def gud-pstar "print* %e" nil |
| 615 | "Evaluate C dereferenced pointer expression at point.") | 626 | "Evaluate C dereferenced pointer expression at point.") |
| 627 | ;; For debugging Emacs only. | ||
| 628 | (gud-def gud-pp "pp %e" nil "Print the emacs s-expression.") | ||
| 616 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") | 629 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") |
| 617 | (gud-def gud-run "run" nil "Run the program.") | 630 | (gud-def gud-run "run" nil "Run the program.") |
| 618 | 631 | ||