summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-11-07 05:39:40 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-11-07 05:39:40 -0500
commit54e22bfe9591ef6e83613757dd43c4cce2255cef (patch)
treefe25f255a0cb4887b7cdf1cc40db270e8d66ef6c /src/base
parentda24915181516740e94efc7de4d9e9263c663e0d (diff)
downloadgem5-54e22bfe9591ef6e83613757dd43c4cce2255cef.tar.xz
Broke remote_gdb into a base class and architecture specific derived classes.
--HG-- extra : convert_revision : 8c528fab56a95b8245ad0f2572d62bb556ce0dde
Diffstat (limited to 'src/base')
-rw-r--r--src/base/remote_gdb.cc15
-rw-r--r--src/base/remote_gdb.hh4
2 files changed, 19 insertions, 0 deletions
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index 01166d46f..fae814904 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -571,6 +571,21 @@ BaseRemoteGDB::removeHardBreak(Addr addr, size_t len)
return true;
}
+void
+BaseRemoteGDB::setTempBreakpoint(Addr bkpt)
+{
+ DPRINTF(GDBMisc, "setTempBreakpoint: addr=%#x\n", bkpt);
+ insertHardBreak(bkpt, sizeof(TheISA::MachInst));
+}
+
+void
+BaseRemoteGDB::clearTempBreakpoint(Addr &bkpt)
+{
+ DPRINTF(GDBMisc, "setTempBreakpoint: addr=%#x\n", bkpt);
+ removeHardBreak(bkpt, sizeof(TheISA::MachInst));
+ bkpt = 0;
+}
+
const char *
BaseRemoteGDB::break_type(char c)
{
diff --git a/src/base/remote_gdb.hh b/src/base/remote_gdb.hh
index 65e4313eb..4a1754afd 100644
--- a/src/base/remote_gdb.hh
+++ b/src/base/remote_gdb.hh
@@ -212,6 +212,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();
};