diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2011-05-04 20:38:27 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2011-05-04 20:38:27 -0500 |
commit | 8aff996db13d039e3021671718b55e3c56b1c95d (patch) | |
tree | 07eab0823f3b03b9acdc755292ee0b20853949ba /src/sim/debug.cc | |
parent | 77bea2fb42f246b26deedb39ce2786dafd50fe30 (diff) | |
download | gem5-8aff996db13d039e3021671718b55e3c56b1c95d.tar.xz |
Debug: Add a function to cause the simulator to create a checkpoint from GDB.
Diffstat (limited to 'src/sim/debug.cc')
-rw-r--r-- | src/sim/debug.cc | 12 |
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() { |