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/m6800/m6800.c | |
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/m6800/m6800.c')
-rw-r--r-- | src/emu/cpu/m6800/m6800.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c index f6368db6516..2eaf4ce1579 100644 --- a/src/emu/cpu/m6800/m6800.c +++ b/src/emu/cpu/m6800/m6800.c @@ -264,7 +264,7 @@ enum #define ONE_MORE_INSN() { \ UINT8 ireg; \ pPPC = pPC; \ - CALL_DEBUGGER(PCD); \ + debugger_instruction_hook(Machine, PCD); \ ireg=M_RDOP(PCD); \ PC++; \ (*m6800.insn[ireg])(); \ @@ -987,7 +987,7 @@ static int m6800_execute(int cycles) else { pPPC = pPC; - CALL_DEBUGGER(PCD); + debugger_instruction_hook(Machine, PCD); ireg=M_RDOP(PCD); PC++; @@ -1334,7 +1334,7 @@ static int m6803_execute(int cycles) else { pPPC = pPC; - CALL_DEBUGGER(PCD); + debugger_instruction_hook(Machine, PCD); ireg=M_RDOP(PCD); PC++; @@ -1674,7 +1674,7 @@ static int hd63701_execute(int cycles) else { pPPC = pPC; - CALL_DEBUGGER(PCD); + debugger_instruction_hook(Machine, PCD); ireg=M_RDOP(PCD); PC++; @@ -2006,7 +2006,7 @@ static int nsc8105_execute(int cycles) else { pPPC = pPC; - CALL_DEBUGGER(PCD); + debugger_instruction_hook(Machine, PCD); ireg=M_RDOP(PCD); PC++; @@ -2652,9 +2652,7 @@ void m6800_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m6800_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m6800_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6800_dasm; break; -#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6800_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -2704,9 +2702,7 @@ void m6801_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6801_init; break; case CPUINFO_PTR_EXECUTE: info->execute = m6803_execute; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6801_dasm; break; -#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "M6801"); break; @@ -2731,9 +2727,7 @@ void m6802_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6802_init; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6802_dasm; break; -#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "M6802"); break; @@ -2761,9 +2755,7 @@ void m6803_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6803_init; break; case CPUINFO_PTR_EXECUTE: info->execute = m6803_execute; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6803_dasm; break; -#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map8 = address_map_m6803_mem; break; @@ -2790,9 +2782,7 @@ void m6808_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6808_init; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6808_dasm; break; -#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "M6808"); break; @@ -2820,9 +2810,7 @@ void hd63701_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = hd63701_init; break; case CPUINFO_PTR_EXECUTE: info->execute = hd63701_execute; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hd63701_dasm; break; -#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "HD63701"); break; @@ -2848,9 +2836,7 @@ void nsc8105_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = nsc8105_init; break; case CPUINFO_PTR_EXECUTE: info->execute = nsc8105_execute; break; -#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = nsc8105_dasm; break; -#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "NSC8105"); break; |