[asterisk-commits] mmichelson: trunk r77381 - in /trunk: ./ Makefile main/logger.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 26 15:39:46 CDT 2007


Author: mmichelson
Date: Thu Jul 26 15:39:46 2007
New Revision: 77381

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77381
Log:
Merged revisions 77380 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77380 | mmichelson | 2007-07-26 15:35:17 -0500 (Thu, 26 Jul 2007) | 7 lines

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


........

Modified:
    trunk/   (props changed)
    trunk/Makefile
    trunk/main/logger.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?view=diff&rev=77381&r1=77380&r2=77381
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Jul 26 15:39:46 2007
@@ -193,7 +193,7 @@
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT)
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -DAST_DEVMODE
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)

Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?view=diff&rev=77381&r1=77380&r2=77381
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Thu Jul 26 15:39:46 2007
@@ -964,7 +964,11 @@
 		if ((strings = backtrace_symbols(addresses, count))) {
 			ast_debug(1, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' ');
 			for (i=0; i < count ; i++) {
-				ast_debug(1, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[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 {




More information about the asterisk-commits mailing list