diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/system.cc | 17 | ||||
-rw-r--r-- | src/sim/system.hh | 6 |
2 files changed, 8 insertions, 15 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc index b3ba1b8f1..f6febe4b1 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -32,6 +32,7 @@ */ #include "arch/isa_traits.hh" +#include "arch/remote_gdb.hh" #include "base/loader/object_file.hh" #include "base/loader/symtab.hh" #include "base/trace.hh" @@ -43,7 +44,6 @@ #include "sim/system.hh" #if FULL_SYSTEM #include "arch/vtophys.hh" -#include "arch/remote_gdb.hh" #include "kern/kernel_stats.hh" #endif @@ -141,14 +141,8 @@ System::~System() #endif // FULL_SYSTEM} } -#if FULL_SYSTEM - - int rgdb_wait = -1; -#endif // FULL_SYSTEM - - void System::setMemoryMode(MemoryMode mode) { @@ -156,6 +150,11 @@ System::setMemoryMode(MemoryMode mode) memoryMode = mode; } +bool System::breakpoint() +{ + return remoteGDB[0]->breakpoint(); +} + int System::registerThreadContext(ThreadContext *tc, int id) { @@ -175,7 +174,6 @@ System::registerThreadContext(ThreadContext *tc, int id) threadContexts[id] = tc; numcpus++; -#if FULL_SYSTEM RemoteGDB *rgdb = new RemoteGDB(this, tc); GDBListener *gdbl = new GDBListener(rgdb, 7000 + id); gdbl->listen(); @@ -191,7 +189,6 @@ System::registerThreadContext(ThreadContext *tc, int id) } remoteGDB[id] = rgdb; -#endif // FULL_SYSTEM return id; } @@ -213,9 +210,7 @@ System::replaceThreadContext(ThreadContext *tc, int id) } threadContexts[id] = tc; -#if FULL_SYSTEM remoteGDB[id]->replaceThreadContext(tc); -#endif // FULL_SYSTEM } #if !FULL_SYSTEM diff --git a/src/sim/system.hh b/src/sim/system.hh index b3a67bf7a..758da709e 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -55,12 +55,12 @@ class PhysicalMemory; #if FULL_SYSTEM class Platform; +#endif class GDBListener; namespace TheISA { class RemoteGDB; } -#endif class System : public SimObject { @@ -159,11 +159,9 @@ class System : public SimObject #endif public: -#if FULL_SYSTEM std::vector<TheISA::RemoteGDB *> remoteGDB; std::vector<GDBListener *> gdbListen; - virtual bool breakpoint() = 0; -#endif // FULL_SYSTEM + bool breakpoint(); public: struct Params |