]> code.delx.au - gnu-emacs/commitdiff
(gdb-find-source-frame): New option.
authorNick Roberts <nickrob@snap.net.nz>
Mon, 31 Jul 2006 06:13:18 +0000 (06:13 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Mon, 31 Jul 2006 06:13:18 +0000 (06:13 +0000)
(gdb-stopped): Use it.

lisp/progmodes/gdb-ui.el

index 466ef70ff23e6452bb7e9b7db0ba6ed5077e3483..ce50c81e92d732052018211f1546c009f645bcd4 100644 (file)
@@ -1358,6 +1358,12 @@ directives."
   :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."
+  :group 'gud
+  :type 'boolean
+  :version "22.1")
+
 (defun gdb-stopped (ignored)
   "An annotation handler for `stopped'.
 It is just like `gdb-stopping', except that if we already set the output
@@ -1371,14 +1377,15 @@ sink to `user' in `gdb-stopping', that is fine."
     (if gdb-same-frame
        (gdb-display-gdb-buffer)
       (gdb-frame-gdb-buffer))
+    (if gdb-find-source-frame
     ;;Try to find source further up stack e.g after signal.
-    (setq gdb-look-up-stack
-         (if (gdb-get-buffer 'gdb-stack-buffer)
-             'keep
-           (progn
-             (gdb-get-buffer-create 'gdb-stack-buffer)
-             (gdb-invalidate-frames)
-             'delete)))))
+       (setq gdb-look-up-stack
+             (if (gdb-get-buffer 'gdb-stack-buffer)
+                 'keep
+               (progn
+                 (gdb-get-buffer-create 'gdb-stack-buffer)
+                 (gdb-invalidate-frames)
+                 'delete))))))
   (unless (member gdb-inferior-status '("exited" "signal"))
     (setq gdb-inferior-status "stopped")
     (gdb-force-mode-line-update