From: Nick Roberts Date: Mon, 31 Jul 2006 06:13:18 +0000 (+0000) Subject: (gdb-find-source-frame): New option. X-Git-Tag: emacs-pretest-22.0.90~1176 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2b63aedbe1ccc3205c61f3913f5ed0b199398c9e;p=emacs.git (gdb-find-source-frame): New option. (gdb-stopped): Use it. --- diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 466ef70ff23..ce50c81e92d 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -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