… | |
… | |
151 | #define dbg(level,...) #level |
151 | #define dbg(level,...) #level |
152 | #define dbg_func(level,indent,...) #level |
152 | #define dbg_func(level,indent,...) #level |
153 | #define dbg_assert(expr) ((expr) ? (void) 0 : (void) 0) |
153 | #define dbg_assert(expr) ((expr) ? (void) 0 : (void) 0) |
154 | |
154 | |
155 | #endif |
155 | #endif |
|
|
156 | |
|
|
157 | |
|
|
158 | // #define _CIDEBUG_BUILD_ 1 |
|
|
159 | |
|
|
160 | |
|
|
161 | #ifdef _CIDEBUG_BUILD_ |
|
|
162 | #define tests_dbg(level,...) debug_for_tests_printf(level,__VA_ARGS__); |
|
|
163 | #else |
|
|
164 | #define tests_dbg(level,...) #level |
|
|
165 | #endif |
|
|
166 | |
156 | |
167 | |
157 | |
168 | |
158 | |
169 | |
159 | //#ifdef DEBUG_MALLOC |
170 | //#ifdef DEBUG_MALLOC |
160 | // ---------------- |
171 | // ---------------- |
… | |
… | |
187 | struct debug *debug_new(struct attr *parent, struct attr **attrs); |
198 | struct debug *debug_new(struct attr *parent, struct attr **attrs); |
188 | int debug_level_get(const char *name); |
199 | int debug_level_get(const char *name); |
189 | void debug_vprintf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, va_list ap); |
200 | void debug_vprintf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, va_list ap); |
190 | void debug_vprintf_func(int level, int indent, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, va_list ap); |
201 | void debug_vprintf_func(int level, int indent, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, va_list ap); |
191 | void debug_printf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...); |
202 | void debug_printf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...); |
|
|
203 | void debug_for_tests_vprintf(int level, const char *fmt, va_list ap); |
|
|
204 | void debug_for_tests_printf(int level, const char *fmt, ...); |
192 | void debug_printf_func(int level, int indent, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...); |
205 | void debug_printf_func(int level, int indent, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...); |
193 | void debug_assert_fail(const char *module, const int mlen, const char *function, const int flen, const char *file, int line, const char *expr); |
206 | void debug_assert_fail(const char *module, const int mlen, const char *function, const int flen, const char *file, int line, const char *expr); |
194 | void debug_destroy(void); |
207 | void debug_destroy(void); |
195 | void debug_set_logfile(const char *path); |
208 | void debug_set_logfile(const char *path); |
196 | void debug_dump_mallocs(void); |
209 | void debug_dump_mallocs(void); |
… | |
… | |
346 | } |
359 | } |
347 | #endif |
360 | #endif |
348 | |
361 | |
349 | #endif |
362 | #endif |
350 | |
363 | |
|
|
364 | |