diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/remote_gdb.cc | 15 | ||||
-rw-r--r-- | src/base/remote_gdb.hh | 4 |
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(); }; |