Give more-useful info on a fatal error (Bug#12328).
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Sep 2012 18:29:04 +0000 (11:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Sep 2012 18:29:04 +0000 (11:29 -0700)
commitcf29dd84d205e1c78fed5d1ea0006a382658598c
tree7e6806fdd94ef53cda78db6b29a4df0276408eb4
parent972debf2e7381b4fd2c70f9c1fd585d8bd137917
Give more-useful info on a fatal error (Bug#12328).

* doc/emacs/trouble.texi (Crashing): New section, documenting this.
* etc/NEWS: Document the change.
* src/alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
(die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
of doing the work ourselves.
* src/emacs.c (fatal_error_signal): Let fatal_error_backtrace
do most of the work.
(fatal_error_backtrace): New function, taken from the guts
of the old fatal_error_signal, but with a new option to output
a backtrace.
(shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
info about the signal than just its number.
* src/lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
* src/sysdep.c: Include <execinfo.h>
(emacs_backtrace): New function, taken partly from the previous
code of the 'die' function.
(emacs_abort): Call fatal_error_backtrace rather than abort.
doc/emacs/ChangeLog
doc/emacs/emacs.texi
doc/emacs/trouble.texi
etc/ChangeLog
etc/NEWS
src/ChangeLog
src/alloc.c
src/emacs.c
src/lisp.h
src/sysdep.c