aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--main/logger.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fb8466a35..a5d8eae86 100644
--- a/Makefile
+++ b/Makefile
@@ -192,7 +192,7 @@ ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declar
ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
ifeq ($(AST_DEVMODE),yes)
- ASTCFLAGS+=-Werror -Wunused $(AST_DECLARATION_AFTER_STATEMENT)
+ ASTCFLAGS+=-Werror -Wunused $(AST_DECLARATION_AFTER_STATEMENT) -DAST_DEVMODE
endif
ifneq ($(findstring BSD,$(OSARCH)),)
diff --git a/main/logger.c b/main/logger.c
index 3f0e37583..50d8ca1ab 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -830,7 +830,11 @@ void ast_backtrace(void)
if ((strings = backtrace_symbols(addresses, count))) {
ast_log(LOG_DEBUG, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' ');
for (i=0; i < count ; i++) {
+#if __WORDSIZE == 32
ast_log(LOG_DEBUG, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]);
+#elif __WORDSIZE == 64
+ ast_log(LOG_DEBUG, "#%d: [%016lX] %s\n", i, (unsigned long)addresses[i], strings[i]);
+#endif
}
free(strings);
} else {