fixed BACKTRACE_ENABLE macro test
parent
f17c1df1ac
commit
1e0c5466c5
|
@ -136,7 +136,6 @@ endif
|
|||
|
||||
# enable backtrace symbol names for Linux & Darwin
|
||||
BACKTRACE ?= 0
|
||||
DEBUGFLAGS = -DBACKTRACE_ENABLE=$(BACKTRACE)
|
||||
ifeq (,$(filter Windows%, $(OS)))
|
||||
ifeq ($(BACKTRACE), 1)
|
||||
DEBUGFLAGS += -DBACKTRACE_ENABLE=1
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <assert.h>
|
||||
#include <errno.h> /* errno */
|
||||
#include <signal.h>
|
||||
#ifdef BACKTRACE_ENABLE
|
||||
#if defined(BACKTRACE_ENABLE) && (BACKTRACE_ENABLE >= 1)
|
||||
# include <execinfo.h> /* backtrace, backtrace_symbols */
|
||||
#endif
|
||||
|
||||
|
@ -168,7 +168,7 @@ static void clearHandler(void)
|
|||
/*-*********************************************************
|
||||
* Termination signal trapping (Print debug stack trace)
|
||||
***********************************************************/
|
||||
#ifdef BACKTRACE_ENABLE
|
||||
#if defined(BACKTRACE_ENABLE) && (BACKTRACE_ENABLE>=1)
|
||||
|
||||
#define MAX_STACK_FRAMES 50
|
||||
|
||||
|
@ -209,7 +209,7 @@ static void ABRThandler(int sig) {
|
|||
|
||||
void FIO_addAbortHandler()
|
||||
{
|
||||
#ifdef BACKTRACE_ENABLE
|
||||
#if defined(BACKTRACE_ENABLE) && (BACKTRACE_ENABLE>=1)
|
||||
signal(SIGABRT, ABRThandler);
|
||||
signal(SIGFPE, ABRThandler);
|
||||
signal(SIGILL, ABRThandler);
|
||||
|
|
Loading…
Reference in New Issue