Initial work to make remote gdb available in SE mode. This is completely untested.
--HG-- extra : convert_revision : 3ad9a3368961d5e9e71f702da84ffe293fe8adc8
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user