diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/remote_gdb.cc | 38 | ||||
-rw-r--r-- | src/base/vnc/SConscript | 8 |
2 files changed, 20 insertions, 26 deletions
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index 980b66bdc..77f793769 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -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,8 @@ #include "debug/GDBAll.hh" #include "mem/port.hh" #include "mem/translating_port.hh" +#include "mem/vport.hh" +#include "sim/full_system.hh" #include "sim/system.hh" using namespace std; @@ -464,12 +460,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 +503,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; } diff --git a/src/base/vnc/SConscript b/src/base/vnc/SConscript index 089509b9b..62448cd70 100644 --- a/src/base/vnc/SConscript +++ b/src/base/vnc/SConscript @@ -39,10 +39,8 @@ Import('*') -if env['FULL_SYSTEM']: - SimObject('VncServer.py') - Source('vncserver.cc') - DebugFlag('VNC') - Source('convert.cc') +SimObject('VncServer.py') +Source('vncserver.cc') +DebugFlag('VNC') |