mirror of https://github.com/xemu-project/xemu.git
Monitor: Debugging support
Add configure options (--enable-debug-mon and --disable-debug-mon) plus the MON_DEBUG() macro. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
261394dbff
commit
b4475aa2b3
|
@ -266,6 +266,7 @@ linux_aio=""
|
||||||
|
|
||||||
gprof="no"
|
gprof="no"
|
||||||
debug_tcg="no"
|
debug_tcg="no"
|
||||||
|
debug_mon="no"
|
||||||
debug="no"
|
debug="no"
|
||||||
strip_opt="yes"
|
strip_opt="yes"
|
||||||
bigendian="no"
|
bigendian="no"
|
||||||
|
@ -514,9 +515,14 @@ for opt do
|
||||||
;;
|
;;
|
||||||
--disable-debug-tcg) debug_tcg="no"
|
--disable-debug-tcg) debug_tcg="no"
|
||||||
;;
|
;;
|
||||||
|
--enable-debug-mon) debug_mon="yes"
|
||||||
|
;;
|
||||||
|
--disable-debug-mon) debug_mon="no"
|
||||||
|
;;
|
||||||
--enable-debug)
|
--enable-debug)
|
||||||
# Enable debugging options that aren't excessively noisy
|
# Enable debugging options that aren't excessively noisy
|
||||||
debug_tcg="yes"
|
debug_tcg="yes"
|
||||||
|
debug_mon="yes"
|
||||||
debug="yes"
|
debug="yes"
|
||||||
strip_opt="no"
|
strip_opt="no"
|
||||||
;;
|
;;
|
||||||
|
@ -1918,6 +1924,7 @@ echo "host CPU $cpu"
|
||||||
echo "host big endian $bigendian"
|
echo "host big endian $bigendian"
|
||||||
echo "target list $target_list"
|
echo "target list $target_list"
|
||||||
echo "tcg debug enabled $debug_tcg"
|
echo "tcg debug enabled $debug_tcg"
|
||||||
|
echo "Mon debug enabled $debug_mon"
|
||||||
echo "gprof enabled $gprof"
|
echo "gprof enabled $gprof"
|
||||||
echo "sparse enabled $sparse"
|
echo "sparse enabled $sparse"
|
||||||
echo "strip binaries $strip_opt"
|
echo "strip binaries $strip_opt"
|
||||||
|
@ -1995,6 +2002,9 @@ echo "ARCH=$ARCH" >> $config_host_mak
|
||||||
if test "$debug_tcg" = "yes" ; then
|
if test "$debug_tcg" = "yes" ; then
|
||||||
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
|
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
if test "$debug_mon" = "yes" ; then
|
||||||
|
echo "CONFIG_DEBUG_MONITOR=y" >> $config_host_mak
|
||||||
|
fi
|
||||||
if test "$debug" = "yes" ; then
|
if test "$debug" = "yes" ; then
|
||||||
echo "CONFIG_DEBUG_EXEC=y" >> $config_host_mak
|
echo "CONFIG_DEBUG_EXEC=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -143,6 +143,14 @@ struct Monitor {
|
||||||
QLIST_ENTRY(Monitor) entry;
|
QLIST_ENTRY(Monitor) entry;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_MONITOR
|
||||||
|
#define MON_DEBUG(fmt, ...) do { \
|
||||||
|
fprintf(stderr, "Monitor: "); \
|
||||||
|
fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
|
||||||
|
#else /* !CONFIG_DEBUG_MONITOR */
|
||||||
|
#define MON_DEBUG(fmt, ...) do { } while (0)
|
||||||
|
#endif /* CONFIG_DEBUG_MONITOR */
|
||||||
|
|
||||||
static QLIST_HEAD(mon_list, Monitor) mon_list;
|
static QLIST_HEAD(mon_list, Monitor) mon_list;
|
||||||
|
|
||||||
static const mon_cmd_t mon_cmds[];
|
static const mon_cmd_t mon_cmds[];
|
||||||
|
|
Loading…
Reference in New Issue