Author: mmichelson
Date: Thu Jul 26 15:35:17 2007
New Revision: 77380

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77380
Log:
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:
    branches/1.4/Makefile
    branches/1.4/main/logger.c

Modified: branches/1.4/Makefile
URL: 
http://svn.digium.com/view/asterisk/branches/1.4/Makefile?view=diff&rev=77380&r1=77379&r2=77380
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Thu Jul 26 15:35:17 2007
@@ -192,7 +192,7 @@
 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)),)

Modified: branches/1.4/main/logger.c
URL: 
http://svn.digium.com/view/asterisk/branches/1.4/main/logger.c?view=diff&rev=77380&r1=77379&r2=77380
==============================================================================
--- branches/1.4/main/logger.c (original)
+++ branches/1.4/main/logger.c Thu Jul 26 15:35:17 2007
@@ -830,7 +830,11 @@
                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 {


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to