changeset 72235:589dd2ca13b2

(gdb-find-source-frame): Make nil the default value. (gdb-find-source-frame): New function. (menu): Add to menu bar.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 01 Aug 2006 23:16:00 +0000
parents befe9f672fae
children 933b9c047ad0
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Tue Aug 01 23:15:32 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Tue Aug 01 23:16:00 2006 +0000
@@ -1358,12 +1358,23 @@
   :type 'boolean
   :version "22.1")
 
-(defcustom gdb-find-source-frame t
-  "Non-nil means try to find source further up stack e.g after signal."
+(defcustom gdb-find-source-frame nil
+  "Non-nil means try to find a source frame further up stack e.g after signal."
   :group 'gud
   :type 'boolean
   :version "22.1")
 
+(defun gdb-find-source-frame (arg)
+  "Toggle trying to find a source frame further up stack.
+With arg, look for a source frame further up stack iff arg is positive."
+  (interactive "P")
+  (setq gdb-find-source-frame
+	(if (null arg)
+	    (not gdb-find-source-frame)
+	  (> (prefix-numeric-value arg) 0)))
+  (message (format "Looking for source frame %sabled"
+		   (if gdb-find-source-frame "en" "dis"))))
+
 (defun gdb-stopped (ignored)
   "An annotation handler for `stopped'.
 It is just like `gdb-stopping', except that if we already set the output
@@ -2785,8 +2796,13 @@
   (define-key gud-menu-map [ui]
     `(menu-item (if (eq gud-minor-mode 'gdba) "GDB-UI" "GDB-MI")
 		,menu :visible (memq gud-minor-mode '(gdbmi gdba))))
+  (define-key menu [gdb-find-source-frame]
+  '(menu-item "Look For Source Frame" gdb-find-source-frame
+	      :visible (eq gud-minor-mode 'gdba)
+	      :help "Toggle look for source frame."
+	      :button (:toggle . gdb-find-source-frame)))
   (define-key menu [gdb-use-separate-io]
-  '(menu-item "Separate inferior IO" gdb-use-separate-io-buffer
+  '(menu-item "Separate Inferior IO" gdb-use-separate-io-buffer
 	      :visible (eq gud-minor-mode 'gdba)
 	      :help "Toggle separate IO for inferior."
 	      :button (:toggle . gdb-use-separate-io-buffer)))