diff options
author | 2008-06-26 14:51:23 +0000 | |
---|---|---|
committer | 2008-06-26 14:51:23 +0000 | |
commit | 68f3a9ab9e20b3737b18e2034f5f5b5a2b016506 (patch) | |
tree | 99695c99728052fd906c54a69fccf1744769ab3a /src/emu/cpu/jaguar | |
parent | 2f6f4aed589190b041704a2994689ffb7c03622e (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/cpu/jaguar')
-rw-r--r-- | src/emu/cpu/jaguar/jaguar.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c index e525a996aaf..58618215a83 100644 --- a/src/emu/cpu/jaguar/jaguar.c +++ b/src/emu/cpu/jaguar/jaguar.c @@ -522,7 +522,7 @@ static int jaguargpu_execute(int cycles) /* debugging */ //if (jaguar.PC < 0xf03000 || jaguar.PC > 0xf04000) { fatalerror("GPU: jaguar.PC = %06X (ppc = %06X)", jaguar.PC, jaguar.ppc); } jaguar.ppc = jaguar.PC; - CALL_DEBUGGER(jaguar.PC); + debugger_instruction_hook(Machine, jaguar.PC); /* instruction fetch */ jaguar.op = ROPCODE(jaguar.PC); @@ -568,7 +568,7 @@ static int jaguardsp_execute(int cycles) /* debugging */ //if (jaguar.PC < 0xf1b000 || jaguar.PC > 0xf1d000) { fatalerror(stderr, "DSP: jaguar.PC = %06X", jaguar.PC); } jaguar.ppc = jaguar.PC; - CALL_DEBUGGER(jaguar.PC); + debugger_instruction_hook(Machine, jaguar.PC); /* instruction fetch */ jaguar.op = ROPCODE(jaguar.PC); @@ -595,7 +595,6 @@ static int jaguardsp_execute(int cycles) DISASSEMBLY HOOK ***************************************************************************/ -#ifdef ENABLE_DEBUGGER static offs_t jaguargpu_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { extern unsigned dasmjag(int, char *, unsigned, const UINT8 *); @@ -607,7 +606,6 @@ static offs_t jaguardsp_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const extern unsigned dasmjag(int, char *, unsigned, const UINT8 *); return dasmjag(JAGUAR_VARIANT_DSP, buffer, pc, oprom); } -#endif /* ENABLE_DEBUGGER */ @@ -806,7 +804,7 @@ void jr_cc_n(void) { INT32 r1 = (INT8)((jaguar.op >> 2) & 0xf8) >> 2; UINT32 newpc = jaguar.PC + r1; - CALL_DEBUGGER(jaguar.PC); + debugger_instruction_hook(Machine, jaguar.PC); jaguar.op = ROPCODE(jaguar.PC); jaguar.PC = newpc; (*jaguar.table[jaguar.op >> 10])(); @@ -823,7 +821,7 @@ void jump_cc_rn(void) /* special kludge for risky code in the cojag DSP interrupt handlers */ UINT32 newpc = (jaguar_icount == bankswitch_icount) ? jaguar.a[reg] : jaguar.r[reg]; - CALL_DEBUGGER(jaguar.PC); + debugger_instruction_hook(Machine, jaguar.PC); jaguar.op = ROPCODE(jaguar.PC); jaguar.PC = newpc; (*jaguar.table[jaguar.op >> 10])(); @@ -1659,9 +1657,7 @@ void jaguargpu_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = jaguar_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = jaguargpu_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguargpu_dasm; break; -#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &jaguar_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -1754,9 +1750,7 @@ void jaguardsp_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_INIT: info->init = jaguardsp_init; break; case CPUINFO_PTR_RESET: info->reset = jaguardsp_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = jaguardsp_execute; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguardsp_dasm; break; -#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "Jaguar DSP"); break; |