diff options
Diffstat (limited to 'kern/tru64/tru64_system.cc')
-rw-r--r-- | kern/tru64/tru64_system.cc | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc index 0a4f8ae4e..66eccf58c 100644 --- a/kern/tru64/tru64_system.cc +++ b/kern/tru64/tru64_system.cc @@ -184,24 +184,44 @@ Tru64System::~Tru64System() } -void -Tru64System::init(ExecContext *xc) +int +Tru64System::registerExecContext(ExecContext *xc) { - xc->regs = *initRegs; + int xcIndex = System::registerExecContext(xc); + + if (xcIndex == 0) { + // xc->regs = *initRegs; + xc->initStatus(ExecContext::Active); + } + else { + xc->initStatus(ExecContext::Unallocated); + } + + RemoteGDB *rgdb = new RemoteGDB(this, xc); + GDBListener *gdbl = new GDBListener(rgdb, 7000 + xcIndex); + gdbl->listen(); + + if (remoteGDB.size() <= xcIndex) { + remoteGDB.resize(xcIndex+1); + } + + remoteGDB[xcIndex] = rgdb; + + return xcIndex; +} - remoteGDB = new RemoteGDB(this, xc); - gdbListen = new GDBListener(remoteGDB, 7000); - gdbListen->listen(); - // Reset the system - // - TheISA::init(physmem, &xc->regs); +void +Tru64System::replaceExecContext(ExecContext *xc, int xcIndex) +{ + System::replaceExecContext(xcIndex, xc); + remoteGDB[xcIndex]->replaceExecContext(xc); } bool Tru64System::breakpoint() { - return remoteGDB->trap(ALPHA_KENTRY_IF); + return remoteGDB[0]->trap(ALPHA_KENTRY_IF); } BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tru64System) |