summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2020-01-22 20:40:38 -0800
committerGabe Black <gabeblack@google.com>2020-01-23 23:36:35 +0000
commite3c3d2a1a8aed9f67338ee08d678263525ffaddc (patch)
treef39016659b9e9a2e9aecd662aa6bf3dd64470116
parentb0de06c5d3e6c1c05eb5f7c92b1a4de0c5a9858a (diff)
downloadgem5-e3c3d2a1a8aed9f67338ee08d678263525ffaddc.tar.xz
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 <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>
-rw-r--r--src/sim/debug.cc8
-rw-r--r--src/sim/debug.hh7
2 files changed, 0 insertions, 15 deletions
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<BreakPCEvent>(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
*/