class Processor;
class PhysicalMemory;
-class RemoteGDB;
-class GDBListener;
-
#else
class Process;
class PhysicalMemory;
class MemoryController;
-class RemoteGDB;
-class GDBListener;
-
namespace TheISA {
namespace Kernel {
class Statistics;
#include "arch/stacktrace.hh"
#include "arch/tlb.hh"
#include "arch/vtophys.hh"
-#include "base/remote_gdb.hh"
#else // !FULL_SYSTEM
#include "mem/mem_object.hh"
#endif // FULL_SYSTEM
#endif // FULL_SYSTEM
-class RemoteGDB;
-class GDBListener;
-
namespace TheISA
{
class Predecoder;
add_option("--debug-break", metavar="TIME[,TIME]", action='append', split=',',
help="Cycle to create a breakpoint")
add_option("--remote-gdb-port", type='int', default=7000,
- help="Remote gdb base port")
+ help="Remote gdb base port (set to 0 to disable listening)")
# Tracing options
set_group("Trace Options")
// thread contexts associated with this process
std::vector<int> contextIds;
- // remote gdb objects
- std::vector<BaseRemoteGDB *> remoteGDB;
- std::vector<GDBListener *> gdbListen;
- bool breakpoint();
-
// number of CPUs (esxec contexts, really) assigned to this process.
unsigned int numCpus() { return contextIds.size(); }
#endif // FULL_SYSTEM}
}
-int rgdb_wait = -1;
-int rgdb_enable = true;
-
void
System::setMemoryMode(Enums::MemoryMode mode)
{
return false;
}
+/**
+ * Setting rgdb_wait to a positive integer waits for a remote debugger to
+ * connect to that context ID before continuing. This should really
+ be a parameter on the CPU object or something...
+ */
+int rgdb_wait = -1;
+
int
System::registerThreadContext(ThreadContext *tc, int assigned)
{
_numContexts++;
int port = getRemoteGDBPort();
- if (rgdb_enable && port) {
+ if (port) {
RemoteGDB *rgdb = new RemoteGDB(this, tc);
GDBListener *gdbl = new GDBListener(rgdb, port + id);
gdbl->listen();
- /**
- * Uncommenting this line waits for a remote debugger to
- * connect to the simulator before continuing.
- */
+
if (rgdb_wait != -1 && rgdb_wait == id)
gdbl->accept();