summaryrefslogtreecommitdiff
path: root/src/sim/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/debug.cc')
-rw-r--r--src/sim/debug.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sim/debug.cc b/src/sim/debug.cc
index e866c13e7..bd7924117 100644
--- a/src/sim/debug.cc
+++ b/src/sim/debug.cc
@@ -38,6 +38,7 @@
#include "sim/debug.hh"
#include "sim/eventq.hh"
#include "sim/sim_events.hh"
+#include "sim/sim_exit.hh"
using namespace std;
@@ -88,6 +89,17 @@ schedBreakCycle(Tick when)
warn("need to stop all queues");
}
+///
+/// Function to cause the simulator to take a checkpoint from the debugger
+///
+void
+takeCheckpoint(Tick when)
+{
+ if (!when)
+ when = curTick() + 1;
+ exitSimLoop("checkpoint", 0, when, 0);
+}
+
void
eventqDump()
{