summaryrefslogtreecommitdiff
path: root/src/sim/system.cc
diff options
context:
space:
mode:
authorMichael Adler <Michael.Adler@intel.com>2008-07-23 14:41:33 -0700
committerMichael Adler <Michael.Adler@intel.com>2008-07-23 14:41:33 -0700
commit8c4f18f6f5e5dd9ccc4ef54590a11d70ba001264 (patch)
treea7d309a3269112993b84ca4d33dc8e7842906bfd /src/sim/system.cc
parent9389ede894895999bf6cb20da64aa5b4c3a400b0 (diff)
downloadgem5-8c4f18f6f5e5dd9ccc4ef54590a11d70ba001264.tar.xz
RemoteGDB: add an m5 command line option for setting or disabling remote gdb.
Diffstat (limited to 'src/sim/system.cc')
-rw-r--r--src/sim/system.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 10b9b1217..803881539 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -42,6 +42,7 @@
#include "mem/physical.hh"
#include "sim/byteswap.hh"
#include "sim/system.hh"
+#include "sim/debug.hh"
#if FULL_SYSTEM
#include "arch/vtophys.hh"
#include "kern/kernel_stats.hh"
@@ -183,9 +184,10 @@ System::registerThreadContext(ThreadContext *tc, int id)
threadContexts[id] = tc;
numcpus++;
- if (rgdb_enable) {
+ int port = getRemoteGDBPort();
+ if (rgdb_enable && port) {
RemoteGDB *rgdb = new RemoteGDB(this, tc);
- GDBListener *gdbl = new GDBListener(rgdb, 7000 + id);
+ GDBListener *gdbl = new GDBListener(rgdb, port + id);
gdbl->listen();
/**
* Uncommenting this line waits for a remote debugger to