fixed bug in mate.cabal '.' should be in include dir not included itself
[mate.git] / debug.h
1 /* DBG_JIT .... see generated code and CodeGen information
2  * DBG_BB ..... BasicBlock information
3  * DBG_MP ..... MethodPool.hs
4  * DBG_CP ..... ClassPool.hs
5  * DBG_STR .... Strings.hs
6  * // no printf* defined
7  * DBG_TRAP ... show information @ trap.c
8  * DBG_CLASS .. dump classfile
9  */
10
11 /* ooops defines */
12 #ifdef BG_JIT
13 #define DBG_JIT
14 #endif
15
16 #ifdef BG_BB
17 #define DBG_BB
18 #endif
19
20 #ifdef BG_MP
21 #define DBG_MP
22 #endif
23
24 #ifdef BG_CP
25 #define DBG_CP
26 #endif
27
28 #ifdef BG_STR
29 #define DBG_STR
30 #endif
31
32 #ifdef BG_TRAP
33 #define DBG_TRAP
34 #endif
35
36 #ifdef BG_CLASS
37 #define DBG_CLASS
38 #endif
39
40 /* if one constant from above is defined, we want to import
41  * libraries like Text.Printf
42  * needed for gettting proper `-Wall' output on a release build */
43
44 #if defined(DBG_JIT) || defined(DBG_BB) || defined(DBG_MP) || defined(DBG_CP) || defined(DBG_STR)
45 #define DEBUG
46 #endif
47
48 /* it would be awesome if we could just write
49  * > printfFake = printf
50  * here, but the type can't be infered, since `PrintfType'
51  * isn't visible (at least this is my explanation :/).
52  * if I'm wrong, move this to `Mate/Debug.hs'
53  */
54 #ifdef DBG_JIT
55 #define printfJit printf
56 #endif
57
58 #ifdef DBG_BB
59 #define printfBb printf
60 #endif
61
62 #ifdef DBG_MP
63 #define printfMp printf
64 #endif
65
66 #ifdef DBG_CP
67 #define printfCp printf
68 #endif
69
70 #ifdef DBG_STR
71 #define printfStr printf
72 #endif