#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"
#include "debug/GDBAll.hh"
#include "mem/port.hh"
#include "mem/translating_port.hh"
+#include "mem/vport.hh"
#include "sim/system.hh"
using namespace std;
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)) {
} 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;
}