summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcmd.cpp
diff options
context:
space:
mode:
author Miodrag Milanović <mmicko@gmail.com>2016-06-23 07:53:01 +0200
committer GitHub <noreply@github.com>2016-06-23 07:53:01 +0200
commitf55646ea6f2142a22acb5e2465b5a441a79f8ab5 (patch)
tree84c7de2eb82dfa3ba096a5591c3f97f5ebac10b3 /src/emu/debug/debugcmd.cpp
parent76e50d19484cb9250530f63d9f51b188f3ccd5df (diff)
parentd6f9e3bc1ce1de91612dbec0db5e4fbbbcef4727 (diff)
Merge pull request #987 from ajrhacker/debugpassthru
Eliminate some unnecessary pass-through methods from debugcpu (nw)
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r--src/emu/debug/debugcmd.cpp16
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");