summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp
diff options
context:
space:
mode:
author GavinAndrews <GavinAndrews@yahoo.com>2018-04-02 17:23:38 +0100
committer R. Belmont <rb6502@users.noreply.github.com>2018-04-02 12:23:38 -0400
commit06a09d38216c4a64f1dd33a3137ed8ef4df92fdc (patch)
tree178381f45cd6887728f8a0b35eefe912a8044067 /src/emu/debug/debugcpu.cpp
parent729c0ca3edb36a29238f30f90f9165a02bd37e01 (diff)
Added suspend and resume debugger commands (#3411)
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r--src/emu/debug/debugcpu.cpp23
1 files changed, 23 insertions, 0 deletions
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