|
Last change
on this file was
6366,
checked in by westram, 16 years ago
|
- fixed whitespace (scripted)
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | // =============================================================== // |
|---|
| 2 | // // |
|---|
| 3 | // File : arb_debug.h // |
|---|
| 4 | // Purpose : some debugging tools // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in May 2007 // |
|---|
| 7 | // Institute of Microbiology (Technical University Munich) // |
|---|
| 8 | // http://www.arb-home.de/ // |
|---|
| 9 | // // |
|---|
| 10 | // =============================================================== // |
|---|
| 11 | #ifndef ARB_DEBUG_H |
|---|
| 12 | #define ARB_DEBUG_H |
|---|
| 13 | |
|---|
| 14 | #if defined(DEBUG) |
|---|
| 15 | |
|---|
| 16 | // if you get the valgrind warning |
|---|
| 17 | // "Conditional jump or move depends on uninitialized value" |
|---|
| 18 | // for a complex statement, use the following macro to find out |
|---|
| 19 | // which part of the statement is the cause. |
|---|
| 20 | |
|---|
| 21 | #define TEST_INITIALIZED(expr) do { \ |
|---|
| 22 | if (expr) printf("0"); \ |
|---|
| 23 | else printf("1"); \ |
|---|
| 24 | } while (0) |
|---|
| 25 | |
|---|
| 26 | #else |
|---|
| 27 | |
|---|
| 28 | #define TEST_INITIALIZED(expr) { int TEST_INITIALIZED; } // create a warning |
|---|
| 29 | |
|---|
| 30 | #endif // DEBUG |
|---|
| 31 | |
|---|
| 32 | #else |
|---|
| 33 | #error arb_debug.h included twice |
|---|
| 34 | #endif // ARB_DEBUG_H |
|---|
| 35 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.