Mercurial > hg > xemacs-beta
diff lisp/loadup.el @ 4841:3465c3161fea
when `debug', abort when lisp error during loadup
loadup.el: When featurep `debug-xemacs' (configure --with-debug), set
debug-on-error, so that we get an exit-to-debugger/assertion
failure upon Lisp error during loadup. Unset before dumping.
cmdloop.c: During really-early-error-handler, exit to the debugger and abort
if an error occurs and
lisp.h: extern Vdebug_on_error.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 13 Jan 2010 01:55:56 -0600 |
parents | 061e030e3270 |
children | aa8197436fdb |
line wrap: on
line diff
--- a/lisp/loadup.el Tue Jan 12 23:19:13 2010 -0600 +++ b/lisp/loadup.el Wed Jan 13 01:55:56 2010 -0600 @@ -2,7 +2,7 @@ ;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1996 Richard Mlynarik. -;; Copyright (C) 1995, 1996, 2003 Ben Wing. +;; Copyright (C) 1995, 1996, 2003, 2005 Ben Wing. ;; Maintainer: XEmacs Development Team ;; Keywords: internal, dumped @@ -44,6 +44,12 @@ ;; Help debug problems. (setq stack-trace-on-error t load-always-display-messages t) +(when (featurep 'debug-xemacs) + ;; Immediately dump core upon an unhandled error, rather than just quitting + ;; the program. This can also be achieved by setting an environment variable + ;; XEMACSDEBUG to contain '(setq debug-on-error t)', e.g. + ;; export XEMACSDEBUG='(setq debug-on-error t)' + (setq debug-on-error t)) ;(princ (format "command-line-args: %s\n" command-line-args)) ;(princ (format "configure-lisp-directory: %S\n" configure-lisp-directory)) @@ -239,7 +245,8 @@ (really-free)) ;; Make sure we don't dump with debugging messages turned on. (setq stack-trace-on-error nil - load-always-display-messages nil) + load-always-display-messages nil + debug-on-error nil) (dump-emacs (cond ((featurep 'infodock) "infodock")