From: Gabe Black Date: Wed, 2 Nov 2011 08:27:45 +0000 (-0700) Subject: SE/FS: Get FULL_SYSTEM out of base/remote_gdb.cc. X-Git-Tag: stable_2012_06_28~290 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb15604f2c20391ec47bc9727b0fc1eceb4467db;p=gem5.git SE/FS: Get FULL_SYSTEM out of base/remote_gdb.cc. --- diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index 980b66bdc..aa13e1f50 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -122,13 +122,7 @@ #include #include -#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 @@ BaseRemoteGDB::read(Addr vaddr, size_t size, char *data) 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 @@ BaseRemoteGDB::write(Addr vaddr, size_t size, const char *data) } 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; }