diff options
author | 2020-05-25 11:15:39 -0400 | |
---|---|---|
committer | 2020-05-25 11:15:39 -0400 | |
commit | 0fa6e7eb86d3b247c46f840ef230c9331f3cc948 (patch) | |
tree | e01509e44adcff62a7d8e087c58572fce6b90e13 /src/mame/machine/fddebug.cpp | |
parent | ad7a31ad57b09e1e0e9bb1adb03767f9dd386605 (diff) |
Debugger expression and memory access overhaul
- Memory references in expressions no longer default to the console's visible CPU if no device name was specified, except when entered through the console itself. Expressions in view windows now use the context of the currently selected device instead.
- The pcatmem debug command and similar qt mouseover function now produce an error message if the initial address translation fails.
Related internal changes (nw)
- The debugger_cpu class no longer interprets memory accesses. The existing routines have been moved into symbol_table (which used to invoke them as callbacks), and reimplemented in most other places. Thecode duplication is a bit messy, but could be potentially improved in the future with new utility classes.
- The cheat engine no longer needs to hook into the debugger_cpu class or instantiate a dummy instance of it.
- The inclusion of debug/express.h within emu.h has been undone. Some debugging structures now need unique_ptr to wrap the resulting incomplete classes; hopefully the performance impact of this is negligible. Another direct consequence is that the breakpoint, watchpoint and registerpoint classes are no longer inside device_debug and have their own source file.
- The breakpoint list is now a std::multimap, using the addresses as keys to hopefully expedite lookup.
- The visible CPU pointer has been removed from the debugger_cpu class, being now considered a property of the console instead.
- Many minor bits of code have been simplified.
Diffstat (limited to 'src/mame/machine/fddebug.cpp')
-rw-r--r-- | src/mame/machine/fddebug.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/machine/fddebug.cpp b/src/mame/machine/fddebug.cpp index a62cb823d9a..1e186468e12 100644 --- a/src/mame/machine/fddebug.cpp +++ b/src/mame/machine/fddebug.cpp @@ -883,7 +883,7 @@ static void execute_fdeliminate(running_machine &machine, int ref, int params, c static void execute_fdunlock(running_machine &machine, int ref, int params, const char **param) { - device_t *cpu = machine.debugger().cpu().get_visible_cpu(); + device_t *cpu = machine.debugger().console().get_visible_cpu(); /* support 0 or 1 parameters */ uint64_t offset; @@ -920,7 +920,7 @@ static void execute_fdunlock(running_machine &machine, int ref, int params, cons static void execute_fdignore(running_machine &machine, int ref, int params, const char **param) { - device_t *cpu = machine.debugger().cpu().get_visible_cpu(); + device_t *cpu = machine.debugger().console().get_visible_cpu(); /* support 0 or 1 parameters */ if (params == 1 && strcmp(param[0], "all") == 0) @@ -944,7 +944,7 @@ static void execute_fdignore(running_machine &machine, int ref, int params, cons /* if no parameter given, implicitly run as well */ if (params == 0) - machine.debugger().cpu().get_visible_cpu()->debug()->go(); + machine.debugger().console().get_visible_cpu()->debug()->go(); } @@ -1026,7 +1026,7 @@ static void execute_fdstate(running_machine &machine, int ref, int params, const static void execute_fdpc(running_machine &machine, int ref, int params, const char **param) { - device_t *cpu = machine.debugger().cpu().get_visible_cpu(); + device_t *cpu = machine.debugger().console().get_visible_cpu(); /* support 0 or 1 parameters */ uint64_t newpc = 0; @@ -1048,7 +1048,7 @@ static void execute_fdpc(running_machine &machine, int ref, int params, const ch static void execute_fdsearch(running_machine &machine, int ref, int params, const char **param) { - address_space &space = machine->debugger().cpu().get_visible_cpu()->memory().space(AS_PROGRAM); + address_space &space = machine->debugger().console().get_visible_cpu()->memory().space(AS_PROGRAM); int pc = space.device().state().pc(); int length, first = true; uint8_t instrdata[2]; @@ -1174,7 +1174,7 @@ static void execute_fdsearch(running_machine &machine, int ref, int params, cons static void execute_fddasm(running_machine &machine, int ref, int params, const char **param) { - address_space &space = machine->debugger().cpu().get_visible_cpu()->memory().space(AS_PROGRAM); + address_space &space = machine->debugger().console().get_visible_cpu()->memory().space(AS_PROGRAM); int origstate = fd1094_set_state(keyregion, -1); const char *filename; int skipped = false; |