mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-20 10:59:26 +00:00
slirp: always build with debug statements
Make debug statements condiitonal only on slirp_debug flags, instead of the pre-processor DEBUG blocks, as it may introduce breakage easily, since the debug code isn't always compiled. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
c2b3350b67
commit
208408c3ed
@ -5,9 +5,8 @@
|
||||
* terms and conditions of the copyright.
|
||||
*/
|
||||
|
||||
//#define DEBUG 1
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef DEBUG_H_
|
||||
#define DEBUG_H_
|
||||
|
||||
#define DBG_CALL 0x1
|
||||
#define DBG_MISC 0x2
|
||||
@ -50,12 +49,4 @@ extern int slirp_debug;
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
#define DEBUG_CALL(fmt, ...)
|
||||
#define DEBUG_ARG(fmt, ...)
|
||||
#define DEBUG_ARGS(fmt, ...)
|
||||
#define DEBUG_MISC(fmt, ...)
|
||||
#define DEBUG_ERROR(fmt, ...)
|
||||
|
||||
#endif
|
||||
#endif /* DEBUG_H_ */
|
||||
|
@ -12,9 +12,13 @@
|
||||
#include "qemu/main-loop.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
int slirp_debug = DBG_CALL|DBG_MISC|DBG_ERROR;
|
||||
#define SLIRP_DEBUG (DBG_CALL | DBG_MISC | DBG_ERROR)
|
||||
#else
|
||||
#define SLIRP_DEBUG 0
|
||||
#endif
|
||||
|
||||
int slirp_debug = SLIRP_DEBUG;
|
||||
|
||||
inline void
|
||||
insque(void *a, void *b)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user