summaryrefslogtreecommitdiff
path: root/sim/system.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/system.cc')
-rw-r--r--sim/system.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/sim/system.cc b/sim/system.cc
index 9fdadf649..1b1a145c6 100644
--- a/sim/system.cc
+++ b/sim/system.cc
@@ -194,12 +194,6 @@ System::registerExecContext(ExecContext *xc)
int xcIndex = execContexts.size();
execContexts.push_back(xc);
- if (xcIndex == 0) {
- // activate with zero delay so that we start ticking right
- // away on cycle 0
- xc->activate(0);
- }
-
RemoteGDB *rgdb = new RemoteGDB(this, xc);
GDBListener *gdbl = new GDBListener(rgdb, 7000 + xcIndex);
gdbl->listen();
@@ -219,6 +213,16 @@ System::registerExecContext(ExecContext *xc)
}
void
+System::startup()
+{
+ if (!execContexts.empty()) {
+ // activate with zero delay so that we start ticking right
+ // away on cycle 0
+ execContexts[0]->activate(0);
+ }
+}
+
+void
System::replaceExecContext(ExecContext *xc, int xcIndex)
{
if (xcIndex >= execContexts.size()) {