X86: Implement the BOUND instruction.
[gem5.git] / src / base / remote_gdb.hh
index 65e4313eb6e103b03ad80c1815f27e257d20da3a..92e599585f3770211485bd92537c639142819395 100644 (file)
@@ -32,6 +32,7 @@
 #define __REMOTE_GDB_HH__
 
 #include <map>
+#include <sys/signal.h>
 
 #include "arch/types.hh"
 #include "cpu/pc_event.hh"
@@ -145,6 +146,7 @@ class BaseRemoteGDB
 
         uint64_t * regs;
         size_t size;
+        size_t bytes() { return size * sizeof(uint64_t); }
     };
 
     GdbRegCache gdbregs;
@@ -176,6 +178,10 @@ class BaseRemoteGDB
 
     virtual bool acc(Addr addr, size_t len) = 0;
     bool trap(int type);
+    virtual bool breakpoint()
+    {
+        return trap(SIGTRAP);
+    }
 
   protected:
     virtual void getregs() = 0;
@@ -212,6 +218,10 @@ class BaseRemoteGDB
     bool insertHardBreak(Addr addr, size_t len);
     bool removeHardBreak(Addr addr, size_t len);
 
+  protected:
+    void clearTempBreakpoint(Addr &bkpt);
+    void setTempBreakpoint(Addr bkpt);
+
   public:
     std::string name();
 };