diff options
| author | Richard M. Stallman | 1994-12-22 23:22:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-22 23:22:32 +0000 |
| commit | 2291bfaae184ccf84399f12954ee8845a5af4db7 (patch) | |
| tree | 27a74de89a08e1fadde5e6fd63ceaf475fef2d08 | |
| parent | 020c97d28eb2138fcff78705995351e1a3a76421 (diff) | |
| download | emacs-2291bfaae184ccf84399f12954ee8845a5af4db7.tar.gz emacs-2291bfaae184ccf84399f12954ee8845a5af4db7.zip | |
(gdb): Correct tbreak doc string.
(gud-mode): Define a Gud menu.
(gdb): Set debugger-specific menu entries.
(sdb) (dbx) (xdb): Likewise.
| -rw-r--r-- | lisp/gud.el | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/lisp/gud.el b/lisp/gud.el index cf61396cb27..d39e87484df 100644 --- a/lisp/gud.el +++ b/lisp/gud.el | |||
| @@ -32,7 +32,8 @@ | |||
| 32 | ;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com> | 32 | ;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com> |
| 33 | ;; added support for xdb (HPUX debugger). Rick Sladkey <jrs@world.std.com> | 33 | ;; added support for xdb (HPUX debugger). Rick Sladkey <jrs@world.std.com> |
| 34 | ;; wrote the GDB command completion code. Dave Love <d.love@dl.ac.uk> | 34 | ;; wrote the GDB command completion code. Dave Love <d.love@dl.ac.uk> |
| 35 | ;; added the IRIX kluge and re-implemented the Mips-ish variant. | 35 | ;; added the IRIX kluge, re-implemented the Mips-ish variant and added |
| 36 | ;; a menu. | ||
| 36 | 37 | ||
| 37 | ;;; Code: | 38 | ;;; Code: |
| 38 | 39 | ||
| @@ -146,7 +147,7 @@ we're in the GUD buffer)." | |||
| 146 | ;; | 147 | ;; |
| 147 | ;; The job of the find-file method is to visit and return the buffer indicated | 148 | ;; The job of the find-file method is to visit and return the buffer indicated |
| 148 | ;; by the car of gud-tag-frame. This may be a file name, a tag name, or | 149 | ;; by the car of gud-tag-frame. This may be a file name, a tag name, or |
| 149 | ;; something else. | 150 | ;; something else. It would be good if it also copied the Gud menubar entry. |
| 150 | 151 | ||
| 151 | ;; ====================================================================== | 152 | ;; ====================================================================== |
| 152 | ;; gdb functions | 153 | ;; gdb functions |
| @@ -250,6 +251,10 @@ and source-file directory for your debugger." | |||
| 250 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") | 251 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") |
| 251 | 252 | ||
| 252 | (local-set-key "\C-i" 'gud-gdb-complete-command) | 253 | (local-set-key "\C-i" 'gud-gdb-complete-command) |
| 254 | (local-set-key [menu-bar debug tbreak] '("Temporary breakpoint" . gud-tbreak)) | ||
| 255 | (local-set-key [menu-bar debug finish] '("Finish function" . gud-finish)) | ||
| 256 | (local-set-key [menu-bar debug up] '("Up stack" . gud-up)) | ||
| 257 | (local-set-key [menu-bar debug down] '("Down stack" . gud-down)) | ||
| 253 | (setq comint-prompt-regexp "^(.*gdb[+]?) *") | 258 | (setq comint-prompt-regexp "^(.*gdb[+]?) *") |
| 254 | (setq paragraph-start comint-prompt-regexp) | 259 | (setq paragraph-start comint-prompt-regexp) |
| 255 | (run-hooks 'gdb-mode-hook) | 260 | (run-hooks 'gdb-mode-hook) |
| @@ -433,6 +438,8 @@ and source-file directory for your debugger." | |||
| 433 | 438 | ||
| 434 | (setq comint-prompt-regexp "\\(^\\|\n\\)\\*") | 439 | (setq comint-prompt-regexp "\\(^\\|\n\\)\\*") |
| 435 | (setq paragraph-start comint-prompt-regexp) | 440 | (setq paragraph-start comint-prompt-regexp) |
| 441 | (local-set-key [menu-bar debug tbreak] | ||
| 442 | '("Temporary breakpoint" . gud-tbreak)) | ||
| 436 | (run-hooks 'sdb-mode-hook) | 443 | (run-hooks 'sdb-mode-hook) |
| 437 | ) | 444 | ) |
| 438 | 445 | ||
| @@ -666,6 +673,8 @@ and source-file directory for your debugger." | |||
| 666 | 673 | ||
| 667 | (setq comint-prompt-regexp "^[^)\n]*dbx) *") | 674 | (setq comint-prompt-regexp "^[^)\n]*dbx) *") |
| 668 | (setq paragraph-start comint-prompt-regexp) | 675 | (setq paragraph-start comint-prompt-regexp) |
| 676 | (local-set-key [menu-bar debug up] '("Up stack" . gud-up)) | ||
| 677 | (local-set-key [menu-bar debug down] '("Down stack" . gud-down)) | ||
| 669 | (run-hooks 'dbx-mode-hook) | 678 | (run-hooks 'dbx-mode-hook) |
| 670 | ) | 679 | ) |
| 671 | 680 | ||
| @@ -763,6 +772,10 @@ directories if your program contains sources from more than one directory." | |||
| 763 | 772 | ||
| 764 | (setq comint-prompt-regexp "^>") | 773 | (setq comint-prompt-regexp "^>") |
| 765 | (setq paragraph-start comint-prompt-regexp) | 774 | (setq paragraph-start comint-prompt-regexp) |
| 775 | (local-set-key [menu-bar debug tbreak] '("Temporary breakpoint" . gud-tbreak)) | ||
| 776 | (local-set-key [menu-bar debug finish] '("Finish function" . gud-finish)) | ||
| 777 | (local-set-key [menu-bar debug up] '("Up stack" . gud-up)) | ||
| 778 | (local-set-key [menu-bar debug down] '("Down stack" . gud-down)) | ||
| 766 | (run-hooks 'xdb-mode-hook)) | 779 | (run-hooks 'xdb-mode-hook)) |
| 767 | 780 | ||
| 768 | ;; ====================================================================== | 781 | ;; ====================================================================== |
| @@ -968,6 +981,36 @@ comint mode, which see." | |||
| 968 | (setq mode-line-process '(":%s")) | 981 | (setq mode-line-process '(":%s")) |
| 969 | (use-local-map (copy-keymap comint-mode-map)) | 982 | (use-local-map (copy-keymap comint-mode-map)) |
| 970 | (define-key (current-local-map) "\C-c\C-l" 'gud-refresh) | 983 | (define-key (current-local-map) "\C-c\C-l" 'gud-refresh) |
| 984 | ;; Keymap definitions for menu bar entries common to all debuggers | ||
| 985 | ;; and slots for debugger-dependent ones. The menu should be made | ||
| 986 | ;; to propagate to buffers found by gud-find-file. | ||
| 987 | (define-key (current-local-map) [menu-bar debug] | ||
| 988 | (cons "Gud" (make-sparse-keymap "Gud"))) | ||
| 989 | (define-key (current-local-map) [menu-bar debug refresh] | ||
| 990 | '("Refresh" . gud-refresh)) | ||
| 991 | (define-key (current-local-map) [menu-bar debug remove] | ||
| 992 | '("Remove breakpoint" . gud-remove)) | ||
| 993 | (define-key (current-local-map) [menu-bar debug tbreak] ; gdb, sdb and xdb | ||
| 994 | nil) | ||
| 995 | (define-key (current-local-map) [menu-bar debug break] | ||
| 996 | '("Set breakpoint" . gud-break)) | ||
| 997 | (define-key (current-local-map) [menu-bar debug up] ; gdb, dbx, and xdb | ||
| 998 | nil) | ||
| 999 | (define-key (current-local-map) [menu-bar debug down] ; gdb, dbx, and xdb | ||
| 1000 | nil) | ||
| 1001 | (define-key (current-local-map) [menu-bar debug print] | ||
| 1002 | '("Print expression" . gud-print)) ; though not in the source | ||
| 1003 | ; buffer until it gets a menu... | ||
| 1004 | (define-key (current-local-map) [menu-bar debug finish] ; gdb or xdb | ||
| 1005 | nil) | ||
| 1006 | (define-key (current-local-map) [menu-bar debug stepi] | ||
| 1007 | '("Step instruction" . gud-stepi)) | ||
| 1008 | (define-key (current-local-map) [menu-bar debug step] | ||
| 1009 | '("Step line" . gud-step)) | ||
| 1010 | (define-key (current-local-map) [menu-bar debug next] | ||
| 1011 | '("Next line" . gud-next)) | ||
| 1012 | (define-key (current-local-map) [menu-bar debug cont] | ||
| 1013 | '("Continue" . gud-cont)) | ||
| 971 | (make-local-variable 'gud-last-frame) | 1014 | (make-local-variable 'gud-last-frame) |
| 972 | (setq gud-last-frame nil) | 1015 | (setq gud-last-frame nil) |
| 973 | (make-local-variable 'comint-prompt-regexp) | 1016 | (make-local-variable 'comint-prompt-regexp) |