diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-23 19:09:18 -0700 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-23 19:09:18 -0700 |
commit | cc9a838f4c5a5bf5e8951bdb351fc7d4b74661fb (patch) | |
tree | 1bae8b1b09fcc39d04631c84beaf51f830938372 /kern/tru64/tru64_system.cc | |
parent | 320540829d62f9c5a5290a8c9bd991fda297a210 (diff) | |
parent | 6e2fc8ce766d1f9cb601b4a2a15d1ba294ce97a5 (diff) | |
download | gem5-cc9a838f4c5a5bf5e8951bdb351fc7d4b74661fb.tar.xz |
Merge stever@zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5
--HG--
extra : convert_revision : b0f93bd35d767fd3a520a9fed70a71d40b0056db
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 823a00e5a..8b4ff668d 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) |