mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-13 17:57:12 +08:00
error: add --enable-panic-abort config options
For debugging purposes, make it possible to force calling abort() on ERR_PANIC. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
7a6bf74d02
commit
dcbaf677d4
@ -1829,7 +1829,9 @@ static void nasm_verror_common(int severity, const char *fmt, va_list args)
|
||||
break; /* placate silly compilers */
|
||||
case ERR_PANIC:
|
||||
fflush(NULL);
|
||||
/* abort(); */ /* halt, catch fire, and dump core */
|
||||
#ifdef ABORT_ON_PANIC
|
||||
abort(); /* halt, catch fire, dump core/stop debugger */
|
||||
#endif
|
||||
if (ofile) {
|
||||
fclose(ofile);
|
||||
remove(outname);
|
||||
|
@ -43,6 +43,13 @@ AS_IF([test x"$pa_init_cflags" = x],
|
||||
AS_IF([test x"$pa_optimize" = "x-O0"],
|
||||
[PA_ADD_CFLAGS([-fno-omit-frame-pointer])])
|
||||
|
||||
dnl Abort on panic
|
||||
PA_ARG_ENABLED([panic-abort],
|
||||
[call abort() on panic to trap in the debugger],
|
||||
[AC_DEFINE(ABORT_ON_PANIC)])
|
||||
AH_TEMPLATE(ABORT_ON_PANIC,
|
||||
[Define to 1 to call abort() on panics (internal errors), for debugging.])
|
||||
|
||||
dnl Check for library extension
|
||||
PA_LIBEXT
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user