summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r--src/emu/debug/debugcpu.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 3c58a2168c5..fb762697dfd 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -87,7 +87,12 @@ debugger_cpu::debugger_cpu(running_machine &machine)
}
/* first CPU is visible by default */
- m_visiblecpu = m_machine.firstcpu;
+ for (device_t &device : device_iterator(m_machine.root_device()))
+ if (dynamic_cast<cpu_device *>(&device) != nullptr)
+ {
+ m_visiblecpu = downcast<cpu_device *>(&device);
+ break;
+ }
/* add callback for breaking on VBLANK */
if (m_machine.first_screen() != nullptr)