From 06a09d38216c4a64f1dd33a3137ed8ef4df92fdc Mon Sep 17 00:00:00 2001 From: GavinAndrews Date: Mon, 2 Apr 2018 17:23:38 +0100 Subject: Added suspend and resume debugger commands (#3411) --- src/emu/debug/debugcpu.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/emu/debug/debugcpu.cpp') diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index 37840b2a62c..016d214cfa4 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -1820,6 +1820,29 @@ void device_debug::ignore(bool ignore) } } +//------------------------------------------------- +// suspend +//------------------------------------------------- + +void device_debug::suspend(bool suspend) +{ + assert(m_exec != nullptr); + + if (suspend) { + m_flags |= DEBUG_FLAG_SUSPENDED; + m_exec->suspend(SUSPEND_REASON_HALT, 1); + } + else { + m_flags &= ~DEBUG_FLAG_SUSPENDED; + m_exec->resume(SUSPEND_REASON_HALT); + } + + if (&m_device == m_device.machine().debugger().cpu().live_cpu() && suspend) + { + assert(m_exec != nullptr); + go_next_device(); + } +} //------------------------------------------------- // single_step - single step the device past the -- cgit v1.2.3