2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
11 #include "apps_debugger_config.h"
14 #define WARNING(x...) fprintf(stderr, x)
15 #define ERROR(x...) fprintf(stderr, x)
18 #if APPS_DEBUGGER_TRACE_DWARF_DIE
19 # define TRACE_DIE(x...) printf(x)
20 # define TRACE_DIE_ONLY(x) x
22 # define TRACE_DIE(x...) (void)0
23 # define TRACE_DIE_ONLY(x)
26 #if APPS_DEBUGGER_TRACE_DWARF_LINE_INFO
27 # define TRACE_LINES(x...) printf(x)
28 # define TRACE_LINES_ONLY(x) x
30 # define TRACE_LINES(x...) (void)0
31 # define TRACE_LINES_ONLY(x)
34 #if APPS_DEBUGGER_TRACE_DWARF_LINE_INFO >= 2
35 # define TRACE_LINES2(x...) printf(x)
36 # define TRACE_LINES2_ONLY(x) x
38 # define TRACE_LINES2(x...) (void)0
39 # define TRACE_LINES2_ONLY(x)
42 #if APPS_DEBUGGER_TRACE_DWARF_EXPRESSIONS
43 # define TRACE_EXPR(x...) printf(x)
44 # define TRACE_EXPR_ONLY(x) x
46 # define TRACE_EXPR(x...) (void)0
47 # define TRACE_EXPR_ONLY(x)
50 #if APPS_DEBUGGER_TRACE_DWARF_PUBLIC_TYPES
51 # define TRACE_PUBTYPES(x...) printf(x)
52 # define TRACE_PUBTYPES_ONLY(x) x
54 # define TRACE_PUBTYPES(x...) (void)0
55 # define TRACE_PUBTYPES_ONLY(x)
58 #if APPS_DEBUGGER_TRACE_CFI
59 # define TRACE_CFI(x...) printf(x)
60 # define TRACE_CFI_ONLY(x) x
62 # define TRACE_CFI(x...) (void)0
63 # define TRACE_CFI_ONLY(x)
66 #if APPS_DEBUGGER_TRACE_STACK_FRAME_LOCALS
67 # define TRACE_LOCALS(x...) printf(x)
68 # define TRACE_LOCALS_ONLY(x) x
70 # define TRACE_LOCALS(x...) (void)0
71 # define TRACE_LOCALS_ONLY(x)
74 #if APPS_DEBUGGER_TRACE_IMAGES
75 # define TRACE_IMAGES(x...) printf(x)
76 # define TRACE_IMAGES_ONLY(x) x
78 # define TRACE_IMAGES(x...) (void)0
79 # define TRACE_IMAGES_ONLY(x)
82 #if APPS_DEBUGGER_TRACE_CODE
83 # define TRACE_CODE(x...) printf(x)
84 # define TRACE_CODE_ONLY(x) x
86 # define TRACE_CODE(x...) (void)0
87 # define TRACE_CODE_ONLY(x)
90 #if APPS_DEBUGGER_TRACE_JOBS
91 # define TRACE_JOBS(x...) printf(x)
92 # define TRACE_JOBS_ONLY(x) x
94 # define TRACE_JOBS(x...) (void)0
95 # define TRACE_JOBS_ONLY(x)
98 #if APPS_DEBUGGER_TRACE_DEBUG_EVENTS
99 # define TRACE_EVENTS(x...) printf(x)
100 # define TRACE_EVENTS_ONLY(x) x
102 # define TRACE_EVENTS(x...) (void)0
103 # define TRACE_EVENTS_ONLY(x)
106 #if APPS_DEBUGGER_TRACE_TEAM_CONTROL
107 # define TRACE_CONTROL(x...) printf(x)
108 # define TRACE_CONTROL_ONLY(x) x
110 # define TRACE_CONTROL(x...) (void)0
111 # define TRACE_CONTROL_ONLY(x)
114 #if APPS_DEBUGGER_TRACE_GUI
115 # define TRACE_GUI(x...) printf(x)
116 # define TRACE_GUI_ONLY(x) x
118 # define TRACE_GUI(x...) (void)0
119 # define TRACE_GUI_ONLY(x)