summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2017-12-06 12:37:30 -0500
committer GitHub <noreply@github.com>2017-12-06 12:37:30 -0500
commit09203fd1739338497a15f90f532df317cf1087c0 (patch)
tree3a342f8054cd06f49f090f50309b4b85763d2413 /src/emu/debug/debugcpu.cpp
parent93ab0949c9dc09f573099dcb621ce43a867f0dcd (diff)
parenta88483233d75ff8c1528445b3510b40424ac324b (diff)
Merge pull request #2897 from vadosnaprimer/rewind
Rewind feature and RAM savestates.
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r--src/emu/debug/debugcpu.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 9a1b35cf210..38b21a8bd7f 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -1862,6 +1862,7 @@ void device_debug::single_step(int numsteps)
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_capture();
m_stepsleft = numsteps;
m_stepaddr = ~0;
m_flags |= DEBUG_FLAG_STEPPING;
@@ -1878,6 +1879,7 @@ void device_debug::single_step_over(int numsteps)
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_capture();
m_stepsleft = numsteps;
m_stepaddr = ~0;
m_flags |= DEBUG_FLAG_STEPPING_OVER;
@@ -1894,6 +1896,7 @@ void device_debug::single_step_out()
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_capture();
m_stepsleft = 100;
m_stepaddr = ~0;
m_flags |= DEBUG_FLAG_STEPPING_OUT;
@@ -1910,6 +1913,7 @@ void device_debug::go(offs_t targetpc)
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_invalidate();
m_stopaddr = targetpc;
m_flags |= DEBUG_FLAG_STOP_PC;
m_device.machine().debugger().cpu().set_execution_state(EXECUTION_STATE_RUNNING);
@@ -1924,6 +1928,7 @@ void device_debug::go_vblank()
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_invalidate();
m_flags |= DEBUG_FLAG_STOP_VBLANK;
m_device.machine().debugger().cpu().go_vblank();
}
@@ -1938,6 +1943,7 @@ void device_debug::go_interrupt(int irqline)
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_invalidate();
m_stopirq = irqline;
m_flags |= DEBUG_FLAG_STOP_INTERRUPT;
m_device.machine().debugger().cpu().set_execution_state(EXECUTION_STATE_RUNNING);
@@ -1957,6 +1963,7 @@ void device_debug::go_exception(int exception)
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_invalidate();
m_stopexception = exception;
m_flags |= DEBUG_FLAG_STOP_EXCEPTION;
m_device.machine().debugger().cpu().set_execution_state(EXECUTION_STATE_RUNNING);
@@ -1972,6 +1979,7 @@ void device_debug::go_milliseconds(u64 milliseconds)
{
assert(m_exec != nullptr);
+ m_device.machine().rewind_invalidate();
m_stoptime = m_device.machine().time() + attotime::from_msec(milliseconds);
m_flags |= DEBUG_FLAG_STOP_TIME;
m_device.machine().debugger().cpu().set_execution_state(EXECUTION_STATE_RUNNING);