diff options
| author | 2009-01-30 18:11:46 +0000 | |
|---|---|---|
| committer | 2009-01-30 18:11:46 +0000 | |
| commit | cc14b2aaa7e809eaa965f6fd5dec1a598b5f35da (patch) | |
| tree | 12a72a2c95964cf0753fae2d86fa786a03ee02e2 /src/emu/debug/debugcpu.c | |
| parent | af29135b58d13924f282b38268578b272bc4fda4 (diff) | |
Opcode accesses are now marked debugger_access. This is important with the recent
changes to automatically call the read handler if the opcode base cannot be
found.
Changed logging for non-RAM opcode bases so that it does not output in the case
of debugger_access being set.
Fixed logic for deriving direct ranges so that it uses the non-watchpoint-
infected tables for its lookups.
Diffstat (limited to 'src/emu/debug/debugcpu.c')
| -rw-r--r-- | src/emu/debug/debugcpu.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 4c6c2907508..ba93ecb64e0 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -1736,6 +1736,7 @@ void debug_write_qword(const address_space *space, offs_t address, UINT64 data, UINT64 debug_read_opcode(const address_space *space, offs_t address, int size, int arg) { UINT64 result = ~(UINT64)0 & (~(UINT64)0 >> (64 - 8*size)), result2; + debugcpu_private *global = space->machine->debugcpu_data; cpu_debug_data *info = cpu_get_debug_data(space->cpu); /* keep in logical range */ @@ -1745,8 +1746,14 @@ UINT64 debug_read_opcode(const address_space *space, offs_t address, int size, i if (info->readop != NULL) { UINT64 result; + + /* return early if we got the result directly */ + memory_set_debugger_access(space, global->debugger_access = TRUE); if ((*info->readop)(space->cpu, address, size, &result)) + { + memory_set_debugger_access(space, global->debugger_access = FALSE); return result; + } } /* if we're bigger than the address bus, break into smaller pieces */ @@ -1820,6 +1827,10 @@ UINT64 debug_read_opcode(const address_space *space, offs_t address, int size, i fatalerror("debug_read_opcode: unknown type = %d", space->dbits / 8 * 10 + size); break; } + + /* turn on debugger access */ + if (!global->debugger_access) + memory_set_debugger_access(space, global->debugger_access = TRUE); /* switch off the size and handle unaligned accesses */ switch (size) @@ -1866,6 +1877,9 @@ UINT64 debug_read_opcode(const address_space *space, offs_t address, int size, i } break; } + + /* no longer accessing via the debugger */ + memory_set_debugger_access(space, global->debugger_access = FALSE); return result; } |
