grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / usb / poseidon / debug.h
blob028f3c41669d551ef898cbdde321bdd961775e6a
1 #undef XPRINTF
2 #undef KPRINTF
3 #undef DB
5 #ifndef DB_LEVEL
6 #define DB_LEVEL 1
7 #endif
9 //#define DEBUG 1
11 //#define MEMDEBUG
13 #ifdef AROS_USB30_CODE
14 #undef DEBUG
15 #undef DB_LEVEL
16 #define DEBUG 1
17 #define DB_LEVEL 1000
18 #endif
20 #include <proto/debug.h>
22 // DEBUG 0 should equal undefined DEBUG
23 #ifdef DEBUG
24 #if DEBUG == 0
25 #undef DEBUG
26 #endif
27 #endif
29 #ifdef DEBUG
30 #define XPRINTF(l, x) do { if ((l) >= DB_LEVEL) \
31 { KPrintF("%s:%s/%lu: ", __FILE__, __FUNCTION__, __LINE__); KPrintF x;} } while (0)
32 #if DEBUG > 1
33 #define KPRINTF(l, x) do { if ((l) >= DB_LEVEL) \
34 { KPrintF("%s:%s/%lu: ", __FILE__, __FUNCTION__, __LINE__); KPrintF x;} } while (0)
35 #else
36 #define KPRINTF(l, x)
37 #endif
38 #define DB(x) x
39 void dumpmem_poseidon(void *mem, unsigned long int len);
40 #else /* !DEBUG */
42 #define KPRINTF(l, x)
43 #define XPRINTF(l, x)
44 #define DB(x)
46 #endif /* DEBUG */