Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: commits

[3761] cherokee/trunk/cherokee/macros.h: Adds a new CHEROKEE_PRINT_BACKTRACE macro.

 

 

Cherokee commits RSS feed   Index | Next | Previous | View Threaded


cherokee at cherokee-project

Oct 30, 2009, 9:17 AM

Post #1 of 1 (32 views)
Permalink
[3761] cherokee/trunk/cherokee/macros.h: Adds a new CHEROKEE_PRINT_BACKTRACE macro.

Revision: 3761
http://svn.cherokee-project.com/changeset/3761
Author: alo
Date: 2009-10-30 17:17:15 +0100 (Fri, 30 Oct 2009)

Log Message:
-----------
Adds a new CHEROKEE_PRINT_BACKTRACE macro.

Modified Paths:
--------------
cherokee/trunk/cherokee/macros.h

Modified: cherokee/trunk/cherokee/macros.h
===================================================================
--- cherokee/trunk/cherokee/macros.h 2009-10-30 16:16:17 UTC (rev 3760)
+++ cherokee/trunk/cherokee/macros.h 2009-10-30 16:17:15 UTC (rev 3761)
@@ -387,7 +387,17 @@
# define SLASH '/'
#endif

+#define CHEROKEE_CRASH \
+ do { \
+ *((int *)(0)) = 1; \
+ } while(0)

-#define CHEROKEE_CRASH do { *((int *)(0)) = 1; } while(0)
+#define CHEROKEE_PRINT_BACKTRACE \
+ do { \
+ cherokee_buffer_t tmp = CHEROKEE_BUF_INIT; \
+ cherokee_buf_add_backtrace (&tmp, 0); \
+ PRINT_MSG ("%s", tmp.buf); \
+ cherokee_buffer_mrproper (&tmp); \
+ } while (0);

#endif /* CHEROKEE_MACROS_H */

Cherokee commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.