sim: Add relative break scheduling

Add schedRelBreak() function, executable within a debugger, that sets a
breakpoint by relative rather than absolute tick.
This commit is contained in:
Dylan Johnson 2015-10-09 14:27:09 -05:00
parent 90c279e4b1
commit 7624fc1fb4
2 changed files with 13 additions and 0 deletions

View file

@ -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)
{

View file

@ -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