]> git.eshelyaron.com Git - emacs.git/commitdiff
(gdb): Correct tbreak doc string.
authorRichard M. Stallman <rms@gnu.org>
Thu, 22 Dec 1994 23:22:32 +0000 (23:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 22 Dec 1994 23:22:32 +0000 (23:22 +0000)
(gud-mode): Define a Gud menu.
(gdb): Set debugger-specific menu entries.
(sdb) (dbx) (xdb): Likewise.

lisp/gud.el

index cf61396cb2769b7b87fe48dc02625e2cb940d1f6..d39e87484df9c4397601f25505ae48ae84e5b7f2 100644 (file)
@@ -32,7 +32,8 @@
 ;; who also hacked the mode to use comint.el.  Shane Hartman <shane@spr.com>
 ;; added support for xdb (HPUX debugger).  Rick Sladkey <jrs@world.std.com>
 ;; wrote the GDB command completion code.  Dave Love <d.love@dl.ac.uk>
-;; added the IRIX kluge and re-implemented the Mips-ish variant.
+;; added the IRIX kluge, re-implemented the Mips-ish variant and added
+;; a menu.
 
 ;;; Code:
 
@@ -146,7 +147,7 @@ we're in the GUD buffer)."
 ;;
 ;; The job of the find-file method is to visit and return the buffer indicated
 ;; by the car of gud-tag-frame.  This may be a file name, a tag name, or
-;; something else.
+;; something else.  It would be good if it also copied the Gud menubar entry.
 \f
 ;; ======================================================================
 ;; gdb functions
@@ -250,6 +251,10 @@ and source-file directory for your debugger."
   (gud-def gud-print  "print %e"     "\C-p" "Evaluate C expression at point.")
 
   (local-set-key "\C-i" 'gud-gdb-complete-command)
+  (local-set-key [menu-bar debug tbreak] '("Temporary breakpoint" . gud-tbreak))
+  (local-set-key [menu-bar debug finish] '("Finish function" . gud-finish))
+  (local-set-key [menu-bar debug up] '("Up stack" . gud-up))
+  (local-set-key [menu-bar debug down] '("Down stack" . gud-down))
   (setq comint-prompt-regexp "^(.*gdb[+]?) *")
   (setq paragraph-start comint-prompt-regexp)
   (run-hooks 'gdb-mode-hook)
@@ -433,6 +438,8 @@ and source-file directory for your debugger."
 
   (setq comint-prompt-regexp  "\\(^\\|\n\\)\\*")
   (setq paragraph-start comint-prompt-regexp)
+  (local-set-key [menu-bar debug tbreak]
+    '("Temporary breakpoint" . gud-tbreak))
   (run-hooks 'sdb-mode-hook)
   )
 \f
@@ -666,6 +673,8 @@ and source-file directory for your debugger."
 
   (setq comint-prompt-regexp  "^[^)\n]*dbx) *")
   (setq paragraph-start comint-prompt-regexp)
+  (local-set-key [menu-bar debug up] '("Up stack" . gud-up))
+  (local-set-key [menu-bar debug down] '("Down stack" . gud-down))
   (run-hooks 'dbx-mode-hook)
   )
 \f
@@ -763,6 +772,10 @@ directories if your program contains sources from more than one directory."
 
   (setq comint-prompt-regexp  "^>")
   (setq paragraph-start comint-prompt-regexp)
+  (local-set-key [menu-bar debug tbreak] '("Temporary breakpoint" . gud-tbreak))
+  (local-set-key [menu-bar debug finish] '("Finish function" . gud-finish))
+  (local-set-key [menu-bar debug up] '("Up stack" . gud-up))
+  (local-set-key [menu-bar debug down] '("Down stack" . gud-down))
   (run-hooks 'xdb-mode-hook))
 \f
 ;; ======================================================================
@@ -968,6 +981,36 @@ comint mode, which see."
   (setq mode-line-process '(":%s"))
   (use-local-map (copy-keymap comint-mode-map))
   (define-key (current-local-map) "\C-c\C-l" 'gud-refresh)
+  ;; Keymap definitions for menu bar entries common to all debuggers
+  ;; and slots for debugger-dependent ones.  The menu should be made
+  ;; to propagate to buffers found by gud-find-file.
+  (define-key (current-local-map) [menu-bar debug]
+    (cons "Gud" (make-sparse-keymap "Gud")))
+  (define-key (current-local-map) [menu-bar debug refresh]
+    '("Refresh" . gud-refresh))
+  (define-key (current-local-map) [menu-bar debug remove]
+    '("Remove breakpoint" . gud-remove))
+  (define-key (current-local-map) [menu-bar debug tbreak] ; gdb, sdb and xdb
+    nil)
+  (define-key (current-local-map) [menu-bar debug break]
+    '("Set breakpoint" . gud-break))
+  (define-key (current-local-map) [menu-bar debug up] ; gdb, dbx, and xdb
+    nil)
+  (define-key (current-local-map) [menu-bar debug down]        ; gdb, dbx, and xdb
+    nil)
+  (define-key (current-local-map) [menu-bar debug print]
+    '("Print expression" . gud-print))  ; though not in the source
+                                        ; buffer until it gets a menu...
+  (define-key (current-local-map) [menu-bar debug finish] ; gdb or xdb
+    nil)
+  (define-key (current-local-map) [menu-bar debug stepi]
+    '("Step instruction" . gud-stepi))
+  (define-key (current-local-map) [menu-bar debug step]
+    '("Step line" . gud-step))
+  (define-key (current-local-map) [menu-bar debug next]
+    '("Next line" . gud-next))
+  (define-key (current-local-map) [menu-bar debug cont]
+    '("Continue" . gud-cont))
   (make-local-variable 'gud-last-frame)
   (setq gud-last-frame nil)
   (make-local-variable 'comint-prompt-regexp)