diff options
Diffstat (limited to 'src/emu/debugger.h')
-rw-r--r-- | src/emu/debugger.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/emu/debugger.h b/src/emu/debugger.h new file mode 100644 index 00000000000..d1e5243f6a3 --- /dev/null +++ b/src/emu/debugger.h @@ -0,0 +1,71 @@ +/**************************************************************************** + + debugger.h + + General debugging interfaces + + Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. + Visit http://mamedev.org for licensing and usage restrictions. + +****************************************************************************/ + +#pragma once + +#ifndef __DEBUGGER_H__ +#define __DEBUGGER_H__ + +#include "mame.h" + + +/*************************************************************************** + MACROS +***************************************************************************/ + +/* handy macro for hard-coding debugger breaks */ +#ifdef MAME_DEBUG +#define DEBUGGER_BREAK if (Machine->debug_mode) mame_debug_break(); +#else +#define DEBUGGER_BREAK +#endif + + +/* handy macro for CPU cores */ +#ifdef MAME_DEBUG +#define CALL_MAME_DEBUG if (Machine->debug_mode) mame_debug_hook(); +#else +#define CALL_MAME_DEBUG +#endif + + + +/*************************************************************************** + FUNCTION PROTOTYPES +***************************************************************************/ + +/* initialize the debugger */ +void mame_debug_init(running_machine *machine); + +/* call this once per instruction from CPU cores */ +void mame_debug_hook(void); + +/* call this to break into the debugger as soon as possible */ +void mame_debug_break(void); + +/* call this to determine if the debugger is currently active (broken) */ +int mame_debug_is_active(void); + + + +/*************************************************************************** + STUBS +***************************************************************************/ + +#ifndef MAME_DEBUG +#define mame_debug_init(m) do { } while (0) +#define mame_debug_hook() do { } while (0) +#define mame_debug_break() do { } while (0) +#define mame_debug_is_active() FALSE +#endif + + +#endif /* __DEBUGGER_H__ */ |