summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/debug/debugcpu.cpp9
1 files changed, 8 insertions, 1 deletions
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_state_interface *>(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;