scripts/qemu.py: log QEMU launch command line
[qemu/ar7.git] / slirp / debug.h
blob44d922df3708290a2440545b7bc6035fdf861048
1 /*
2 * Copyright (c) 1995 Danny Gasparovski.
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
8 #ifndef DEBUG_H_
9 #define DEBUG_H_
11 #define DBG_CALL (1 << 0)
12 #define DBG_MISC (1 << 1)
13 #define DBG_ERROR (1 << 2)
14 #define DBG_TFTP (1 << 3)
16 extern int slirp_debug;
18 #define DEBUG_CALL(fmt, ...) do { \
19 if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
20 g_debug(fmt "...", ##__VA_ARGS__); \
21 } \
22 } while (0)
24 #define DEBUG_ARG(fmt, ...) do { \
25 if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
26 g_debug(" " fmt, ##__VA_ARGS__); \
27 } \
28 } while (0)
30 #define DEBUG_MISC(fmt, ...) do { \
31 if (G_UNLIKELY(slirp_debug & DBG_MISC)) { \
32 g_debug(fmt, ##__VA_ARGS__); \
33 } \
34 } while (0)
36 #define DEBUG_ERROR(fmt, ...) do { \
37 if (G_UNLIKELY(slirp_debug & DBG_ERROR)) { \
38 g_debug(fmt, ##__VA_ARGS__); \
39 } \
40 } while (0)
42 #define DEBUG_TFTP(fmt, ...) do { \
43 if (G_UNLIKELY(slirp_debug & DBG_TFTP)) { \
44 g_debug(fmt, ##__VA_ARGS__); \
45 } \
46 } while (0)
48 #endif /* DEBUG_H_ */