diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-26 20:35:17 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-26 20:35:17 +0000 |
commit | 95aee1eb1d07d857a4cedddf26974866dcb465d8 (patch) | |
tree | d90ab732be9020fe11de5a5ec4c0ec6b38658332 /main/logger.c | |
parent | 02505a9643fe7b1803021b6acfbbc1de7da0c427 (diff) |
Fixes to get ast_backtrace working properly. The AST_DEVMODE macro was never defined so the majority of ast_backtrace never
attempted compilation. The makefile now defines AST_DEVMODE if configure was run with --enable-dev-mode. Also, changes were
made to acccomodate 64 bit systems in ast_backtrace.
Thanks to qwell, kpfleming, and Corydon76 for their roles in allowing me to get this committed
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77380 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 { |