diff options
author | Dylan Johnson <Dylan.Johnson@ARM.com> | 2015-09-02 13:34:19 -0500 |
---|---|---|
committer | Dylan Johnson <Dylan.Johnson@ARM.com> | 2015-09-02 13:34:19 -0500 |
commit | 71b1c6ce762260d023a799cc861ac6bfc8483c1e (patch) | |
tree | 1035209c3e3f05e7cfa1166a93d5379bf5170bd4 /src/sim/debug.cc | |
parent | 17dbb49294e06ce3c486648da899973100c633f1 (diff) | |
download | gem5-71b1c6ce762260d023a799cc861ac6bfc8483c1e.tar.xz |
sim: Add ability to break at specific kernel function
Adds a GDB callable function that sets a breakpoint at
the beginning of a kernel function.
Diffstat (limited to 'src/sim/debug.cc')
-rw-r--r-- | src/sim/debug.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sim/debug.cc b/src/sim/debug.cc index dd504778c..b3d73eff7 100644 --- a/src/sim/debug.cc +++ b/src/sim/debug.cc @@ -38,6 +38,8 @@ #include "sim/global_event.hh" #include "sim/sim_events.hh" #include "sim/sim_exit.hh" +#include "cpu/pc_event.hh" +#include "sim/system.hh" using namespace std; @@ -87,6 +89,14 @@ schedBreak(Tick when) warn("need to stop all queues"); } +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 /// |