sim: Add relative break scheduling
authorDylan Johnson <Dylan.Johnson@ARM.com>
Fri, 9 Oct 2015 19:27:09 +0000 (14:27 -0500)
committerDylan Johnson <Dylan.Johnson@ARM.com>
Fri, 9 Oct 2015 19:27:09 +0000 (14:27 -0500)
Add schedRelBreak() function, executable within a debugger, that sets a
breakpoint by relative rather than absolute tick.

src/sim/debug.cc
src/sim/debug.hh

index b3d73eff781e07b8e7fd8d13c30883dab0cbc1f7..9fab75108de50c2db024d0185f01afd026c985a6 100644 (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)
 {
index 0d324698dab3a95e7ac2030ad6086f78f8daad92..8587325e10cad6b42b5887700a1f6dfe701b9229 100644 (file)
  */
 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