diff options
author | 2016-06-22 16:52:55 -0400 | |
---|---|---|
committer | 2016-06-22 16:52:55 -0400 | |
commit | d6f9e3bc1ce1de91612dbec0db5e4fbbbcef4727 (patch) | |
tree | b7450c5c1428e258317ce43f3de83e1a2e781b39 /src/emu/debug/debugcmd.cpp | |
parent | 32a75e7ae44c148a08b464f327b3549c95e388d0 (diff) |
Eliminate some unnecessary pass-through methods from debugcpu (nw)
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r-- | src/emu/debug/debugcmd.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index 97eeb525fe1..72865e06680 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -2338,9 +2338,14 @@ void debugger_commands::execute_dasm(int ref, int params, const char *param[]) decrypted_space = space; /* determine the width of the bytes */ - cpu_device *cpudevice = downcast<cpu_device *>(&space->device()); - minbytes = cpudevice->min_opcode_bytes(); - maxbytes = cpudevice->max_opcode_bytes(); + device_disasm_interface *dasmintf; + if (!space->device().interface(dasmintf)) + { + m_console.printf("No disassembler available for %s\n", space->device().name()); + return; + } + minbytes = dasmintf->min_opcode_bytes(); + maxbytes = dasmintf->max_opcode_bytes(); byteswidth = 0; if (bytes) { @@ -2538,7 +2543,8 @@ void debugger_commands::execute_history(int ref, int params, const char *param[] device_debug *debug = space->device().debug(); /* loop over lines */ - int maxbytes = debug->max_opcode_bytes(); + device_disasm_interface *dasmintf; + int maxbytes = space->device().interface(dasmintf) ? dasmintf->max_opcode_bytes() : 1; for (int index = 0; index < (int) count; index++) { offs_t pc = debug->history_pc(-index); @@ -2587,7 +2593,7 @@ void debugger_commands::execute_trackpc(int ref, int params, const char *param[] // Insert current pc if (m_cpu.get_visible_cpu() == cpu) { - const offs_t pc = cpu->debug()->pc(); + const offs_t pc = cpu->safe_pc(); cpu->debug()->set_track_pc_visited(pc); } m_console.printf("PC tracking enabled\n"); |