#include <string>
 #include <unistd.h>
 
+#include "config/full_system.hh"
+
+#if FULL_SYSTEM
 #include "arch/vtophys.hh"
+#endif
+
 #include "base/intmath.hh"
 #include "base/remote_gdb.hh"
 #include "base/socket.hh"
 #include "base/trace.hh"
-#include "config/full_system.hh"
 #include "cpu/thread_context.hh"
 #include "cpu/static_inst.hh"
-#include "mem/physical.hh"
+//#include "mem/physical.hh"
 #include "mem/port.hh"
+#include "mem/translating_port.hh"
 #include "sim/system.hh"
 
 using namespace std;
 
     DPRINTF(GDBRead, "read:  addr=%#x, size=%d", vaddr, size);
 
-    VirtualPort *vp = context->getVirtPort(context);
-    vp->readBlob(vaddr, (uint8_t*)data, size);
-    context->delVirtPort(vp);
+#if FULL_SYSTEM
+    VirtualPort *port = context->getVirtPort(context);
+#else
+    TranslatingPort *port = context->getMemPort();
+#endif
+    port->readBlob(vaddr, (uint8_t*)data, size);
+#if FULL_SYSTEM
+    context->delVirtPort(port);
+#else
+    delete port;
+#endif
 
 #if TRACING_ON
     if (DTRACE(GDBRead)) {
         } else
             DPRINTFNR("\n");
     }
-    VirtualPort *vp = context->getVirtPort(context);
-    vp->writeBlob(vaddr, (uint8_t*)data, size);
-    context->delVirtPort(vp);
+#if FULL_SYSTEM
+    VirtualPort *port = context->getVirtPort(context);
+#else
+    TranslatingPort *port = context->getMemPort();
+#endif
+    port->writeBlob(vaddr, (uint8_t*)data, size);
+#if FULL_SYSTEM
+    context->delVirtPort(port);
+#else
+    delete port;
+#endif
 
     return true;
 }
 
  */
 
 #include "arch/isa_traits.hh"
+#include "arch/remote_gdb.hh"
 #include "base/loader/object_file.hh"
 #include "base/loader/symtab.hh"
 #include "base/trace.hh"
 #include "sim/system.hh"
 #if FULL_SYSTEM
 #include "arch/vtophys.hh"
-#include "arch/remote_gdb.hh"
 #include "kern/kernel_stats.hh"
 #endif
 
 #endif // FULL_SYSTEM}
 }
 
-#if FULL_SYSTEM
-
-
 int rgdb_wait = -1;
 
-#endif // FULL_SYSTEM
-
-
 void
 System::setMemoryMode(MemoryMode mode)
 {
     memoryMode = mode;
 }
 
+bool System::breakpoint()
+{
+    return remoteGDB[0]->breakpoint();
+}
+
 int
 System::registerThreadContext(ThreadContext *tc, int id)
 {
     threadContexts[id] = tc;
     numcpus++;
 
-#if FULL_SYSTEM
     RemoteGDB *rgdb = new RemoteGDB(this, tc);
     GDBListener *gdbl = new GDBListener(rgdb, 7000 + id);
     gdbl->listen();
     }
 
     remoteGDB[id] = rgdb;
-#endif // FULL_SYSTEM
 
     return id;
 }
     }
 
     threadContexts[id] = tc;
-#if FULL_SYSTEM
     remoteGDB[id]->replaceThreadContext(tc);
-#endif // FULL_SYSTEM
 }
 
 #if !FULL_SYSTEM