From 2c637cbbf4db0ec40db462336283fbe30d508336 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 8 May 2020 13:40:19 -0400 Subject: Fix recent debugger regression with systems such as fi6845/fi8275 where a DMAC or other non-focusable executing device is scheduled first of all (nw) --- src/emu/debug/debugcpu.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/emu/debug/debugcpu.cpp') diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index a02aa9f49aa..fb5db3ffb89 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -1146,8 +1146,15 @@ void debugger_cpu::start_hook(device_t *device, bool stop_on_vblank) assert(m_livecpu == nullptr); m_livecpu = device; + // can't stop on a device without a state interface + if (m_execution_state == exec_state::STOPPED && dynamic_cast(device) == nullptr) + { + if (m_stop_when_not_device == nullptr) + m_stop_when_not_device = device; + m_execution_state = exec_state::RUNNING; + } // if we're a new device, stop now - if (m_stop_when_not_device != nullptr && m_stop_when_not_device != device && device->debug()->observing()) + else if (m_stop_when_not_device != nullptr && m_stop_when_not_device != device && device->debug()->observing()) { m_stop_when_not_device = nullptr; m_execution_state = exec_state::STOPPED; -- cgit v1.2.3