summaryrefslogtreecommitdiff
path: root/src/sim/system.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-12-20 18:39:40 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-12-20 18:39:40 -0500
commitf13155393df010665b468db5e2e64131a7b2c5da (patch)
tree09a0ee16d3be4a53c2c275f7f403665bd644707b /src/sim/system.cc
parent841d76d37bb86b2ad05ce378282605a748c314eb (diff)
downloadgem5-f13155393df010665b468db5e2e64131a7b2c5da.tar.xz
Initial work to make remote gdb available in SE mode. This is completely untested.
--HG-- extra : convert_revision : 3ad9a3368961d5e9e71f702da84ffe293fe8adc8
Diffstat (limited to 'src/sim/system.cc')
-rw-r--r--src/sim/system.cc17
1 files changed, 6 insertions, 11 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