From: Marc Marí <5.markm...@gmail.com> Modify debug macros as explained in https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg03642.html
Signed-off-by: Marc Marí <5.markm...@gmail.com> --- hw/isa/vt82c686.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 1a93afd..290b946 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -26,14 +26,19 @@ #include "qemu/timer.h" #include "exec/address-spaces.h" -//#define DEBUG_VT82C686B +//#define DEBUG_VT82C686B 1 -#ifdef DEBUG_VT82C686B -#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __FUNCTION__, ##__VA_ARGS__) -#else -#define DPRINTF(fmt, ...) +#ifndef DEBUG_VT82C686B +#define DEBUG_VT82C686B 0 #endif +#define DPRINTF(fmt, ...) \ + do { \ + if(DEBUG_VT82C686B) { \ + fprintf(stderr, "%s: " fmt, __FUNCTION__, ##__VA_ARGS__); \ + } \ + } while(0) + typedef struct SuperIOConfig { uint8_t config[0xff]; -- 1.7.10.4