summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcon.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-06-26 14:51:23 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-06-26 14:51:23 +0000
commit68f3a9ab9e20b3737b18e2034f5f5b5a2b016506 (patch)
tree99695c99728052fd906c54a69fccf1744769ab3a /src/emu/debug/debugcon.c
parent2f6f4aed589190b041704a2994689ffb7c03622e (diff)
Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER
macro from the source code. All MAME builds now include the debugger, and it is enabled/disabled exclusively by the runtime command-line/ini settings. This is a minor speed hit for now, but will be further optimized going forward. Changed the 'd' suffix in the makefile to apply to DEBUG builds (versus DEBUGGER builds as it did before). Changed machine->debug_mode to machine->debug_flags. These flags now indicate several things, such as whether debugging is enabled, whether CPU cores should call the debugger on each instruction, and whether there are live watchpoints on each address space. Redesigned a significant portion of debugcpu.c around the concept of maintaining these flags globally and a similar, more complete set of flags internally for each CPU. All previous functionality should work as designed but should be more robust and faster to work with. Added new debugger hooks for starting/stopping CPU execution. This allows the debugger to decide whether or not a given CPU needs to call the debugger on each instruction during the coming timeslice. Added new debugger hook for reporting exceptions. Proper exception breakpoints are not yet implemented. Added new module debugger.c which is where global debugger functions live.
Diffstat (limited to 'src/emu/debug/debugcon.c')
-rw-r--r--src/emu/debug/debugcon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/emu/debug/debugcon.c b/src/emu/debug/debugcon.c
index a4b710bf703..3dc268bdad8 100644
--- a/src/emu/debug/debugcon.c
+++ b/src/emu/debug/debugcon.c
@@ -16,6 +16,7 @@
#include "debugvw.h"
#include "textbuf.h"
#include "deprecat.h"
+#include "debugger.h"
#include <ctype.h>
@@ -372,7 +373,7 @@ CMDERR debug_console_execute_command(const char *command, int echo)
if (echo)
{
debug_view_update_all();
- debug_refresh_display();
+ debugger_refresh_display(Machine);
}
return result;
}
@@ -399,7 +400,7 @@ void debug_console_register_command(const char *command, UINT32 flags, int ref,
debug_command *cmd;
assert_always(mame_get_phase(Machine) == MAME_PHASE_INIT, "Can only call debug_console_register_command() at init time!");
- assert_always(Machine->debug_mode, "Cannot call debug_console_register_command() when debugger is not running");
+ assert_always((Machine->debug_flags & DEBUG_FLAG_ENABLED) != 0, "Cannot call debug_console_register_command() when debugger is not running");
cmd = auto_malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));