From: Gabe Black Date: Thu, 23 Jan 2020 04:40:38 +0000 (-0800) Subject: sim: Eliminate the breakAtKernelFunction function. X-Git-Tag: v19.0.0.0~77 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3c3d2a1a8aed9f67338ee08d678263525ffaddc;p=gem5.git sim: Eliminate the breakAtKernelFunction function. 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 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/sim/debug.cc b/src/sim/debug.cc index b8291c862..e6ce730d9 100644 --- a/src/sim/debug.cc +++ b/src/sim/debug.cc @@ -96,14 +96,6 @@ schedRelBreak(Tick delta) schedBreak(curTick() + delta); } -void -breakAtKernelFunction(const char* funcName) -{ - System* curSystem = System::systemList[0]; - curSystem->addKernelFuncEvent(funcName, - "GDB scheduled break", true); -} - /// /// Function to cause the simulator to take a checkpoint from the debugger /// diff --git a/src/sim/debug.hh b/src/sim/debug.hh index 8587325e1..9bfa8981a 100644 --- a/src/sim/debug.hh +++ b/src/sim/debug.hh @@ -51,13 +51,6 @@ void schedBreak(Tick when); */ 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 */