mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-19 17:58:29 +00:00
55ef9c617b
to get them out of the hot path. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 1995 Danny Gasparovski.
|
|
*
|
|
* Please read the file COPYRIGHT for the
|
|
* terms and conditions of the copyright.
|
|
*/
|
|
|
|
#ifndef DEBUG_H_
|
|
#define DEBUG_H_
|
|
|
|
#define DBG_CALL 0x1
|
|
#define DBG_MISC 0x2
|
|
#define DBG_ERROR 0x4
|
|
|
|
extern int slirp_debug;
|
|
|
|
#define DEBUG_CALL(fmt, ...) do { \
|
|
if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
|
|
g_debug(fmt "...", ##__VA_ARGS__); \
|
|
} \
|
|
} while (0)
|
|
|
|
#define DEBUG_ARG(fmt, ...) do { \
|
|
if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
|
|
g_debug(" " fmt, ##__VA_ARGS__); \
|
|
} \
|
|
} while (0)
|
|
|
|
#define DEBUG_MISC(fmt, ...) do { \
|
|
if (G_UNLIKELY(slirp_debug & DBG_MISC)) { \
|
|
g_debug(fmt, ##__VA_ARGS__); \
|
|
} \
|
|
} while (0)
|
|
|
|
#define DEBUG_ERROR(fmt, ...) do { \
|
|
if (G_UNLIKELY(slirp_debug & DBG_ERROR)) { \
|
|
g_debug(fmt, ##__VA_ARGS__); \
|
|
} \
|
|
} while (0)
|
|
|
|
#endif /* DEBUG_H_ */
|