* debugify.c, debugify.h: New files. Provide common macros
[deliverable/binutils-gdb.git] / gdb / debugify.h
1
2 #ifndef _DEBUGIFY_H_
3 #define _DEBUGIFY_H_
4
5 #ifdef DEBUGIFY
6 #include <assert.h>
7 #ifdef TO_SCREEN
8 #define DBG(x) OutputDebugString x
9 #elif TO_GDB
10 #define DBG(x) printf_unfiltered x
11 #elif TO_POPUP
12 #define DBG(x) MessageBox x
13 #else /* default: TO_FILE "gdb.log" */
14 #define DBG(x) printf_dbg x
15 #endif
16
17 #define ASSERT(x) assert(x)
18
19 #else /* DEBUGIFY */
20 #define DBG(x)
21 #define ASSERT(x)
22 #endif
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 #ifdef REDIRECT
29 #define printf_unfiltered printf_dbg
30 #define fputs_unfiltered fputs_dbg
31 void fputs_dbg (const char *fmt, FILE *fakestream);
32 #endif /* REDIRECT */
33
34 void puts_dbg(const char *fmt);
35 void printf_dbg(const char *fmt,...);
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif /* _DEBUGIFY_H_ */
42
This page took 0.030627 seconds and 5 git commands to generate.