• Paul Eggert's avatar
    Give more-useful info on a fatal error (Bug#12328). · cf29dd84
    Paul Eggert authored
    * 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.
emacs.c 73.2 KB