From: Dylan Johnson Date: Fri, 9 Oct 2015 19:27:09 +0000 (-0500) Subject: sim: Add relative break scheduling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7624fc1fb461f1dd127763521d85f63e81617d71;p=gem5.git sim: Add relative break scheduling Add schedRelBreak() function, executable within a debugger, that sets a breakpoint by relative rather than absolute tick. --- diff --git a/src/sim/debug.cc b/src/sim/debug.cc index b3d73eff7..9fab75108 100644 --- a/src/sim/debug.cc +++ b/src/sim/debug.cc @@ -89,6 +89,12 @@ schedBreak(Tick when) warn("need to stop all queues"); } +void +schedRelBreak(Tick delta) +{ + schedBreak(curTick() + delta); +} + void breakAtKernelFunction(const char* funcName) { diff --git a/src/sim/debug.hh b/src/sim/debug.hh index 0d324698d..8587325e1 100644 --- a/src/sim/debug.hh +++ b/src/sim/debug.hh @@ -44,6 +44,13 @@ */ void schedBreak(Tick when); +/** + * Cause the simulator to execute a breakpoint + * relative to the current tick. + * @param delta the number of ticks to execute until breaking + */ +void schedRelBreak(Tick delta); + /** * Cause the simulator to execute a breakpoint when * the given kernel function is reached