changeset 8cd08c045cab in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=8cd08c045cab
description:
        SE/FS: Get FULL_SYSTEM out of base/remote_gdb.cc.

diffstat:

 src/base/remote_gdb.cc |  37 ++++++++++++++++---------------------
 1 files changed, 16 insertions(+), 21 deletions(-)

diffs (69 lines):

diff -r 10c9297e14d5 -r 8cd08c045cab src/base/remote_gdb.cc
--- a/src/base/remote_gdb.cc    Wed Nov 02 01:25:15 2011 -0700
+++ b/src/base/remote_gdb.cc    Wed Nov 02 01:27:45 2011 -0700
@@ -122,13 +122,7 @@
 #include <cstdio>
 #include <string>
 
-#include "config/full_system.hh"
-
-#if FULL_SYSTEM
 #include "arch/vtophys.hh"
-#include "mem/vport.hh"
-#endif
-
 #include "base/intmath.hh"
 #include "base/remote_gdb.hh"
 #include "base/socket.hh"
@@ -139,6 +133,7 @@
 #include "debug/GDBAll.hh"
 #include "mem/port.hh"
 #include "mem/translating_port.hh"
+#include "mem/vport.hh"
 #include "sim/system.hh"
 
 using namespace std;
@@ -464,12 +459,13 @@
 
     DPRINTF(GDBRead, "read:  addr=%#x, size=%d", vaddr, size);
 
-#if FULL_SYSTEM
-    VirtualPort *port = context->getVirtPort();
-#else
-    TranslatingPort *port = context->getMemPort();
-#endif
-    port->readBlob(vaddr, (uint8_t*)data, size);
+    if (FullSystem) {
+        VirtualPort *port = context->getVirtPort();
+        port->readBlob(vaddr, (uint8_t*)data, size);
+    } else {
+        TranslatingPort *port = context->getMemPort();
+        port->readBlob(vaddr, (uint8_t*)data, size);
+    }
 
 #if TRACING_ON
     if (DTRACE(GDBRead)) {
@@ -506,15 +502,14 @@
         } else
             DPRINTFNR("\n");
     }
-#if FULL_SYSTEM
-    VirtualPort *port = context->getVirtPort();
-#else
-    TranslatingPort *port = context->getMemPort();
-#endif
-    port->writeBlob(vaddr, (uint8_t*)data, size);
-#if !FULL_SYSTEM
-    delete port;
-#endif
+    if (FullSystem) {
+        VirtualPort *port = context->getVirtPort();
+        port->writeBlob(vaddr, (uint8_t*)data, size);
+    } else {
+        TranslatingPort *port = context->getMemPort();
+        port->writeBlob(vaddr, (uint8_t*)data, size);
+        delete port;
+    }
 
     return true;
 }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to