Changed #ifdef MAGIC_BREAKPOINT to #if BX_MAGIC_BREAKPOINT and added a

configure script option --enable-magic-breakpoints (enabled by default).

Documented the instruction required to trigger the magic breakpoint
(xchgw %bx,%bx).
This commit is contained in:
Michael Brown 2004-01-29 17:49:03 +00:00
parent b29e94b334
commit d1922bc835
9 changed files with 119 additions and 51 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: bochs.h,v 1.133 2004-01-27 21:38:51 vruppert Exp $
// $Id: bochs.h,v 1.134 2004-01-29 17:49:01 mcb30 Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -450,9 +450,9 @@ typedef struct {
bx_bool unsupported_io;
bx_bool serial;
bx_bool cdrom;
#ifdef MAGIC_BREAKPOINT
#if BX_MAGIC_BREAKPOINT
bx_bool magic_break_enabled;
#endif /* MAGIC_BREAKPOINT */
#endif /* BX_MAGIC_BREAKPOINT */
#if BX_SUPPORT_APIC
bx_bool apic;
bx_bool ioapic;

View File

@ -924,6 +924,9 @@ typedef
#define BX_EXTERNAL_DEBUGGER 0
#define BX_OVERRIDE_ASK 0
// Magic breakpoints
#define BX_MAGIC_BREAKPOINT 1
#ifdef WIN32
#define BX_FLOPPY0_NAME "Floppy Disk A:"
#define BX_FLOPPY1_NAME "Floppy Disk B:"

106
bochs/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in,v 1.242 2004/01/17 11:47:11 danielg4 Exp .
# From configure.in Id: configure.in,v 1.243 2004/01/17 20:33:19 danielg4 Exp .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
@ -463,7 +463,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX SET_MAKE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBADD_DL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS BX_USE_NEW_PIT BX_USE_IDLE_HACK DEFINE_PLUGIN_PATH NONPLUGIN_GUI_LINK_OPTS OBJS64 IOAPIC_OBJS APIC_OBJS BX_COMPRESSED_HD_SUPPORT NE2K_OBJS NETLOW_OBJS PCI_OBJ KERNELDIR LSMOD INSMOD RMMOD DEPMOD PCIDEV_MODULE_MAKE_ALL KERNEL_MODULE_SUFFIX SUFFIX_LINE CPP_SUFFIX DEBUGGER_VAR BX_EXTERNAL_DEBUGGER DISASM_VAR READLINE_LIB INSTRUMENT_DIR INSTRUMENT_VAR FPU_VAR FPU_GLUE_OBJ CDROM_OBJS SB16_OBJS SOUNDLOW_OBJS GAME_OBJS GDBSTUB_VAR IODEBUG_OBJS DOCBOOK2HTML BUILD_DOCBOOK_VAR INSTALL_DOCBOOK_VAR IODEV_LIB_VAR EXTRA_BX_OBJS NONINLINE_VAR INLINE_VAR EXTERNAL_DEPENDENCY EXT_DEBUG_OBJS RC_CMD WX_CONFIG XPM_LIB GUI_CFLAGS GUI_CXXFLAGS WX_CFLAGS WX_CXXFLAGS DIALOG_OBJS PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS INSTALL_TARGET INSTALL_LIST_FOR_PLATFORM RFB_LIBS GUI_OBJS DEVICE_LINK_OPTS GUI_LINK_OPTS GUI_LINK_OPTS_TERM GUI_LINK_OPTS_WX DASH SLASH CXXFP CFP OFP MAKELIB RMCOMMAND LINK LINK_CONSOLE EXE PRIMARY_TARGET PLUGIN_LIBNAME_TRANSFORMATION COMMAND_SEPARATOR CD_UP_ONE CD_UP_TWO CD_UP_THREE VERSION VER_STRING REL_STRING EXTRA_LINK_OPTS GUI_NON_PLUGIN_OBJS GUI_PLUGIN_OBJS IODEV_NON_PLUGIN_OBJS IODEV_PLUGIN_OBJS PLUGIN_VAR PLUGIN_TARGET INSTALL_PLUGINS_VAR GZIP TAR LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX SET_MAKE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBADD_DL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS BX_USE_NEW_PIT BX_USE_IDLE_HACK DEFINE_PLUGIN_PATH NONPLUGIN_GUI_LINK_OPTS OBJS64 IOAPIC_OBJS APIC_OBJS BX_COMPRESSED_HD_SUPPORT NE2K_OBJS NETLOW_OBJS PCI_OBJ KERNELDIR LSMOD INSMOD RMMOD DEPMOD PCIDEV_MODULE_MAKE_ALL KERNEL_MODULE_SUFFIX SUFFIX_LINE CPP_SUFFIX DEBUGGER_VAR BX_EXTERNAL_DEBUGGER BX_MAGIC_BREAKPOINT DISASM_VAR READLINE_LIB INSTRUMENT_DIR INSTRUMENT_VAR FPU_VAR FPU_GLUE_OBJ CDROM_OBJS SB16_OBJS SOUNDLOW_OBJS GAME_OBJS GDBSTUB_VAR IODEBUG_OBJS DOCBOOK2HTML BUILD_DOCBOOK_VAR INSTALL_DOCBOOK_VAR IODEV_LIB_VAR EXTRA_BX_OBJS NONINLINE_VAR INLINE_VAR EXTERNAL_DEPENDENCY EXT_DEBUG_OBJS RC_CMD WX_CONFIG XPM_LIB GUI_CFLAGS GUI_CXXFLAGS WX_CFLAGS WX_CXXFLAGS DIALOG_OBJS PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS INSTALL_TARGET INSTALL_LIST_FOR_PLATFORM RFB_LIBS GUI_OBJS DEVICE_LINK_OPTS GUI_LINK_OPTS GUI_LINK_OPTS_TERM GUI_LINK_OPTS_WX DASH SLASH CXXFP CFP OFP MAKELIB RMCOMMAND LINK LINK_CONSOLE EXE PRIMARY_TARGET PLUGIN_LIBNAME_TRANSFORMATION COMMAND_SEPARATOR CD_UP_ONE CD_UP_TWO CD_UP_THREE VERSION VER_STRING REL_STRING EXTRA_LINK_OPTS GUI_NON_PLUGIN_OBJS GUI_PLUGIN_OBJS IODEV_NON_PLUGIN_OBJS IODEV_PLUGIN_OBJS PLUGIN_VAR PLUGIN_TARGET INSTALL_PLUGINS_VAR GZIP TAR LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1061,6 +1061,7 @@ Optional Features:
--enable-cpp use .cpp as C++ suffix
--enable-debugger compile in support for Bochs internal debugger
--enable-external-debugger enable external debugger support
--enable-magic-breakpoints enable magic debugger breakpoints
--enable-disasm compile in support for disassembler
--enable-all-optimizations compile in all possible optimizations
--enable-readline use readline library, if available
@ -3532,7 +3533,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3535 "configure"' > conftest.$ac_ext
echo '#line 3536 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -4607,7 +4608,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:4610:" \
echo "$as_me:4611:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -5623,11 +5624,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:5626: $lt_compile\"" >&5)
(eval echo "\"\$as_me:5627: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:5630: \$? = $ac_status" >&5
echo "$as_me:5631: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -5856,11 +5857,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:5859: $lt_compile\"" >&5)
(eval echo "\"\$as_me:5860: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:5863: \$? = $ac_status" >&5
echo "$as_me:5864: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -5923,11 +5924,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:5926: $lt_compile\"" >&5)
(eval echo "\"\$as_me:5927: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:5930: \$? = $ac_status" >&5
echo "$as_me:5931: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -7983,7 +7984,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 7986 "configure"
#line 7987 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -8081,7 +8082,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8084 "configure"
#line 8085 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10240,11 +10241,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:10243: $lt_compile\"" >&5)
(eval echo "\"\$as_me:10244: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:10247: \$? = $ac_status" >&5
echo "$as_me:10248: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -10307,11 +10308,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:10310: $lt_compile\"" >&5)
(eval echo "\"\$as_me:10311: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:10314: \$? = $ac_status" >&5
echo "$as_me:10315: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -11564,7 +11565,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 11567 "configure"
#line 11568 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11662,7 +11663,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 11665 "configure"
#line 11666 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12485,11 +12486,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12488: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12489: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:12492: \$? = $ac_status" >&5
echo "$as_me:12493: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -12552,11 +12553,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12555: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12556: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:12559: \$? = $ac_status" >&5
echo "$as_me:12560: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -14546,11 +14547,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14549: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14550: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14553: \$? = $ac_status" >&5
echo "$as_me:14554: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -14779,11 +14780,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14782: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14783: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14786: \$? = $ac_status" >&5
echo "$as_me:14787: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -14846,11 +14847,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14849: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14850: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14853: \$? = $ac_status" >&5
echo "$as_me:14854: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -16906,7 +16907,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 16909 "configure"
#line 16910 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -17004,7 +17005,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 17007 "configure"
#line 17008 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -19161,7 +19162,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 19164 "configure"
#line 19165 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -32780,6 +32781,48 @@ echo "${ECHO_T}no" >&6
fi;
echo "$as_me:$LINENO: checking for magic breakpoints" >&5
echo $ECHO_N "checking for magic breakpoints... $ECHO_C" >&6
EXT_DEBUG_OBJS=''
# Check whether --enable-magic-breakpoints or --disable-magic-breakpoints was given.
if test "${enable_magic_breakpoints+set}" = set; then
enableval="$enable_magic_breakpoints"
if test "$enableval" = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
#define BX_MAGIC_BREAKPOINT 1
_ACEOF
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
cat >>confdefs.h <<\_ACEOF
#define BX_MAGIC_BREAKPOINT 0
_ACEOF
fi
else
if test "$bx_debugger" = 1; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
#define BX_MAGIC_BREAKPOINT 1
_ACEOF
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
cat >>confdefs.h <<\_ACEOF
#define BX_MAGIC_BREAKPOINT 0
_ACEOF
fi
fi;
echo "$as_me:$LINENO: checking for disassembler support" >&5
echo $ECHO_N "checking for disassembler support... $ECHO_C" >&6
# Check whether --enable-disasm or --disable-disasm was given.
@ -37101,6 +37144,7 @@ s,@SUFFIX_LINE@,$SUFFIX_LINE,;t t
s,@CPP_SUFFIX@,$CPP_SUFFIX,;t t
s,@DEBUGGER_VAR@,$DEBUGGER_VAR,;t t
s,@BX_EXTERNAL_DEBUGGER@,$BX_EXTERNAL_DEBUGGER,;t t
s,@BX_MAGIC_BREAKPOINT@,$BX_MAGIC_BREAKPOINT,;t t
s,@DISASM_VAR@,$DISASM_VAR,;t t
s,@READLINE_LIB@,$READLINE_LIB,;t t
s,@INSTRUMENT_DIR@,$INSTRUMENT_DIR,;t t

View File

@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(bochs.h)
AC_REVISION([[$Id: configure.in,v 1.243 2004-01-17 20:33:19 danielg4 Exp $]])
AC_REVISION([[$Id: configure.in,v 1.244 2004-01-29 17:49:02 mcb30 Exp $]])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(ltdlconf.h)
@ -1203,6 +1203,28 @@ AC_ARG_ENABLE(external-debugger,
])
AC_SUBST(BX_EXTERNAL_DEBUGGER)
AC_MSG_CHECKING(for magic breakpoints)
EXT_DEBUG_OBJS=''
AC_ARG_ENABLE(magic-breakpoints,
[ --enable-magic-breakpoints enable magic debugger breakpoints],
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_MAGIC_BREAKPOINT, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_MAGIC_BREAKPOINT, 0)
fi],
[
if test "$bx_debugger" = 1; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_MAGIC_BREAKPOINT, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_MAGIC_BREAKPOINT, 0)
fi
])
AC_SUBST(BX_MAGIC_BREAKPOINT)
AC_MSG_CHECKING(for disassembler support)
AC_ARG_ENABLE(disasm,
[ --enable-disasm compile in support for disassembler],

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.cc,v 1.82 2004-01-17 08:36:29 danielg4 Exp $
// $Id: cpu.cc,v 1.83 2004-01-29 17:49:03 mcb30 Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -115,7 +115,7 @@ BX_CPU_C::cpu_loop(Bit32s max_instr_count)
#if BX_DEBUGGER
BX_CPU_THIS_PTR break_point = 0;
#ifdef MAGIC_BREAKPOINT
#if BX_MAGIC_BREAKPOINT
BX_CPU_THIS_PTR magic_break = 0;
#endif
BX_CPU_THIS_PTR stop_reason = STOP_NO_REASON;
@ -461,7 +461,7 @@ debugger_check:
BX_PANIC(("Weird break point condition"));
}
}
#ifdef MAGIC_BREAKPOINT
#if BX_MAGIC_BREAKPOINT
// (mch) Magic break point support
if (BX_CPU_THIS_PTR magic_break) {
if (bx_dbg.magic_break_enabled) {

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.h,v 1.156 2004-01-17 08:36:29 danielg4 Exp $
// $Id: cpu.h,v 1.157 2004-01-29 17:49:03 mcb30 Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1367,7 +1367,7 @@ union {
#if BX_DEBUGGER
Bit32u watchpoint;
Bit8u break_point;
#ifdef MAGIC_BREAKPOINT
#if BX_MAGIC_BREAKPOINT
Bit8u magic_break;
#endif
Bit8u stop_reason;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: data_xfer16.cc,v 1.26 2003-11-13 21:57:12 sshwarts Exp $
// $Id: data_xfer16.cc,v 1.27 2004-01-29 17:49:03 mcb30 Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -313,13 +313,12 @@ BX_CPU_C::XCHG_EwGw(bxInstruction_c *i)
{
Bit16u op2_16, op1_16;
#ifdef MAGIC_BREAKPOINT
#if BX_DEBUGGER
#if BX_DEBUGGER && BX_MAGIC_BREAKPOINT
// (mch) Magic break point
// Note for mortals: the instruction to trigger this is "xchgw %bx,%bx"
if (i->nnn() == 3 && i->modC0() && i->rm() == 3) {
BX_CPU_THIS_PTR magic_break = 1;
BX_CPU_THIS_PTR magic_break = 1;
}
#endif
#endif
/* op2_16 is a register, op2_addr is an index of a register */

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: init.cc,v 1.49 2003-12-30 22:12:45 cbothamy Exp $
// $Id: init.cc,v 1.50 2004-01-29 17:49:03 mcb30 Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -168,7 +168,7 @@ cpu_param_handler (bx_param_c *param, int set, Bit64s val)
void BX_CPU_C::init(BX_MEM_C *addrspace)
{
BX_DEBUG(( "Init $Id: init.cc,v 1.49 2003-12-30 22:12:45 cbothamy Exp $"));
BX_DEBUG(( "Init $Id: init.cc,v 1.50 2004-01-29 17:49:03 mcb30 Exp $"));
// BX_CPU_C constructor
BX_CPU_THIS_PTR set_INTR (0);
#if BX_SUPPORT_APIC
@ -856,7 +856,7 @@ BX_CPU_C::reset(unsigned source)
BX_CPU_THIS_PTR eipFetchPtr = NULL;
#if BX_DEBUGGER
#ifdef MAGIC_BREAKPOINT
#if BX_MAGIC_BREAKPOINT
BX_CPU_THIS_PTR magic_break = 0;
#endif
BX_CPU_THIS_PTR stop_reason = STOP_NO_REASON;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: main.cc,v 1.261 2004-01-27 21:38:51 vruppert Exp $
// $Id: main.cc,v 1.262 2004-01-29 17:49:02 mcb30 Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -2623,7 +2623,7 @@ bx_init_bx_dbg (void)
bx_dbg.record_io = 0;
bx_dbg.serial = 0;
bx_dbg.cdrom = 0;
#ifdef MAGIC_BREAKPOINT
#if BX_MAGIC_BREAKPOINT
bx_dbg.magic_break_enabled = 0;
#endif
@ -3963,7 +3963,7 @@ parse_line_formatted(char *context, int num_params, char *params[])
}
}
}
#ifdef MAGIC_BREAKPOINT
#if BX_MAGIC_BREAKPOINT
else if (!strcmp(params[0], "magic_break")) {
if (num_params != 2) {
PARSE_ERR(("%s: magic_break directive: wrong # args.", context));