Revision b4475aa2

b/configure
266 266

  
267 267
gprof="no"
268 268
debug_tcg="no"
269
debug_mon="no"
269 270
debug="no"
270 271
strip_opt="yes"
271 272
bigendian="no"
......
514 515
  ;;
515 516
  --disable-debug-tcg) debug_tcg="no"
516 517
  ;;
518
  --enable-debug-mon) debug_mon="yes"
519
  ;;
520
  --disable-debug-mon) debug_mon="no"
521
  ;;
517 522
  --enable-debug)
518 523
      # Enable debugging options that aren't excessively noisy
519 524
      debug_tcg="yes"
525
      debug_mon="yes"
520 526
      debug="yes"
521 527
      strip_opt="no"
522 528
  ;;
......
1918 1924
echo "host big endian   $bigendian"
1919 1925
echo "target list       $target_list"
1920 1926
echo "tcg debug enabled $debug_tcg"
1927
echo "Mon debug enabled $debug_mon"
1921 1928
echo "gprof enabled     $gprof"
1922 1929
echo "sparse enabled    $sparse"
1923 1930
echo "strip binaries    $strip_opt"
......
1995 2002
if test "$debug_tcg" = "yes" ; then
1996 2003
  echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
1997 2004
fi
2005
if test "$debug_mon" = "yes" ; then
2006
  echo "CONFIG_DEBUG_MONITOR=y" >> $config_host_mak
2007
fi
1998 2008
if test "$debug" = "yes" ; then
1999 2009
  echo "CONFIG_DEBUG_EXEC=y" >> $config_host_mak
2000 2010
fi
b/monitor.c
143 143
    QLIST_ENTRY(Monitor) entry;
144 144
};
145 145

  
146
#ifdef CONFIG_DEBUG_MONITOR
147
#define MON_DEBUG(fmt, ...) do {    \
148
    fprintf(stderr, "Monitor: ");       \
149
    fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
150
#else /* !CONFIG_DEBUG_MONITOR */
151
#define MON_DEBUG(fmt, ...) do { } while (0)
152
#endif /* CONFIG_DEBUG_MONITOR */
153

  
146 154
static QLIST_HEAD(mon_list, Monitor) mon_list;
147 155

  
148 156
static const mon_cmd_t mon_cmds[];

Also available in: Unified diff