It looks like this function is supposed to allow you to set up a PC
based event which will trigger when the simulator executes a particular
kernel function. That event doesn't actually do anything, but you can
set a breakpoint there with gdb when debugging gem5 itself.
There are a couple of problems with this function. First, it assumes
that you want to set the breakpoint based on the first system in your
simulation. Frequently simulations have only one system, but there
isn't any rule that says they must, or any way to pick a different
system.
Second, this function assumes that you're in FS mode, that there is a
kernel, and that there is a kernel symbol table to look symbols up in.
On top of that, this function is a bit redundant since you can just use
gdb to debug the kernel inside a simulated system.
Change-Id: I8dadbd42fc7d4ccba2a035a2a72e6ede4b872f3c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24644
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
schedBreak(curTick() + delta);
}
-void
-breakAtKernelFunction(const char* funcName)
-{
- System* curSystem = System::systemList[0];
- curSystem->addKernelFuncEvent<BreakPCEvent>(funcName,
- "GDB scheduled break", true);
-}
-
///
/// Function to cause the simulator to take a checkpoint from the debugger
///
*/
void schedRelBreak(Tick delta);
-/**
- * Cause the simulator to execute a breakpoint when
- * the given kernel function is reached
- * @param funcName the name of the kernel function at which to break
- */
-void breakAtKernelFunction(const char* funcName);
-
/** Cause the simulator to return to python to create a checkpoint
* @param when the cycle to break
*/