diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/debug.cc | 36 | ||||
-rw-r--r-- | src/sim/main.cc | 4 |
2 files changed, 7 insertions, 33 deletions
diff --git a/src/sim/debug.cc b/src/sim/debug.cc index be9566836..84ab1074d 100644 --- a/src/sim/debug.cc +++ b/src/sim/debug.cc @@ -94,45 +94,17 @@ DebugBreakEvent::description() } // -// Parameter context for global debug options -// -class DebugContext : public ParamContext -{ - public: - DebugContext(const string &_iniSection) - : ParamContext(_iniSection) {} - void checkParams(); -}; - -DebugContext debugParams("debug"); - -VectorParam<Tick> break_cycles(&debugParams, "break_cycles", - "cycle(s) to create breakpoint events"); - -void -DebugContext::checkParams() -{ - if (break_cycles.isValid()) { - vector<Tick> &cycles = break_cycles; - - vector<Tick>::iterator i = cycles.begin(); - vector<Tick>::iterator end = cycles.end(); - - for (; i < end; ++i) - new DebugBreakEvent(&mainEventQueue, *i); - } -} - -// // handy function to schedule DebugBreakEvent on main event queue // (callable from debugger) // -void sched_break_cycle(Tick when) +void +schedBreakCycle(Tick when) { new DebugBreakEvent(&mainEventQueue, when); } -void eventq_dump() +void +eventqDump() { mainEventQueue.dump(); } diff --git a/src/sim/main.cc b/src/sim/main.cc index 6037283a4..17209ac20 100644 --- a/src/sim/main.cc +++ b/src/sim/main.cc @@ -119,6 +119,7 @@ abortHandler(int sigtype) extern "C" { void init_main(); +void init_debug(); } int @@ -157,8 +158,9 @@ main(int argc, char **argv) Py_Initialize(); PySys_SetArgv(argc, argv); - // initialize SWIG 'm5.internal.main' module + // initialize SWIG modules init_main(); + init_debug(); PyRun_SimpleString("import m5.main"); PyRun_SimpleString("m5.main.main()"); |