changeset dfd04ffc1773 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=dfd04ffc1773
description:
        Minor remote GDB cleanup.
        Expand the help text on the --remote-gdb-port option so
        people know you can use it to disable remote gdb without
        reading the source code, and thus don't waste any time
        trying to add a separate option to do that.
        Clean up some gdb-related cruft I found while looking
        for where one would add a gdb disable option, before
        I found the comment that told me that I didn't need
        to do that.

diffstat:

 src/cpu/checker/cpu.hh |   3 ---
 src/cpu/ozone/cpu.hh   |   3 ---
 src/cpu/simple/base.cc |   1 -
 src/cpu/simple/base.hh |   3 ---
 src/python/m5/main.py  |   2 +-
 src/sim/process.hh     |   5 -----
 src/sim/system.cc      |  17 +++++++++--------
 7 files changed, 10 insertions(+), 24 deletions(-)

diffs (121 lines):

diff -r 669c1d2df752 -r dfd04ffc1773 src/cpu/checker/cpu.hh
--- a/src/cpu/checker/cpu.hh    Thu Jun 03 11:06:12 2010 -0700
+++ b/src/cpu/checker/cpu.hh    Thu Jun 03 16:54:26 2010 -0700
@@ -54,9 +54,6 @@
 class Processor;
 class PhysicalMemory;
 
-class RemoteGDB;
-class GDBListener;
-
 #else
 
 class Process;
diff -r 669c1d2df752 -r dfd04ffc1773 src/cpu/ozone/cpu.hh
--- a/src/cpu/ozone/cpu.hh      Thu Jun 03 11:06:12 2010 -0700
+++ b/src/cpu/ozone/cpu.hh      Thu Jun 03 16:54:26 2010 -0700
@@ -58,9 +58,6 @@
 class PhysicalMemory;
 class MemoryController;
 
-class RemoteGDB;
-class GDBListener;
-
 namespace TheISA {
     namespace Kernel {
         class Statistics;
diff -r 669c1d2df752 -r dfd04ffc1773 src/cpu/simple/base.cc
--- a/src/cpu/simple/base.cc    Thu Jun 03 11:06:12 2010 -0700
+++ b/src/cpu/simple/base.cc    Thu Jun 03 16:54:26 2010 -0700
@@ -76,7 +76,6 @@
 #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
diff -r 669c1d2df752 -r dfd04ffc1773 src/cpu/simple/base.hh
--- a/src/cpu/simple/base.hh    Thu Jun 03 11:06:12 2010 -0700
+++ b/src/cpu/simple/base.hh    Thu Jun 03 16:54:26 2010 -0700
@@ -63,9 +63,6 @@
 
 #endif // FULL_SYSTEM
 
-class RemoteGDB;
-class GDBListener;
-
 namespace TheISA
 {
     class Predecoder;
diff -r 669c1d2df752 -r dfd04ffc1773 src/python/m5/main.py
--- a/src/python/m5/main.py     Thu Jun 03 11:06:12 2010 -0700
+++ b/src/python/m5/main.py     Thu Jun 03 16:54:26 2010 -0700
@@ -101,7 +101,7 @@
 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")
diff -r 669c1d2df752 -r dfd04ffc1773 src/sim/process.hh
--- a/src/sim/process.hh        Thu Jun 03 11:06:12 2010 -0700
+++ b/src/sim/process.hh        Thu Jun 03 16:54:26 2010 -0700
@@ -91,11 +91,6 @@
     // 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(); }
 
diff -r 669c1d2df752 -r dfd04ffc1773 src/sim/system.cc
--- a/src/sim/system.cc Thu Jun 03 11:06:12 2010 -0700
+++ b/src/sim/system.cc Thu Jun 03 16:54:26 2010 -0700
@@ -151,9 +151,6 @@
 #endif // FULL_SYSTEM}
 }
 
-int rgdb_wait = -1;
-int rgdb_enable = true;
-
 void
 System::setMemoryMode(Enums::MemoryMode mode)
 {
@@ -168,6 +165,13 @@
     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)
 {
@@ -193,14 +197,11 @@
     _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();
 
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to