return &system->pcEventQueue;
}
+bool
+BaseRemoteGDB::checkBpLen(size_t len)
+{
+ return len == sizeof(MachInst);
+}
+
BaseRemoteGDB::HardBreakpoint::HardBreakpoint(BaseRemoteGDB *_gdb, Addr pc)
: PCEvent(_gdb->getPcEventQueue(), "HardBreakpoint Event", pc),
gdb(_gdb), refcount(0)
bool
BaseRemoteGDB::insertSoftBreak(Addr addr, size_t len)
{
- if (len != sizeof(TheISA::MachInst))
+ if (!checkBpLen(len))
panic("invalid length\n");
return insertHardBreak(addr, len);
bool
BaseRemoteGDB::removeSoftBreak(Addr addr, size_t len)
{
- if (len != sizeof(MachInst))
+ if (!checkBpLen(len))
panic("invalid length\n");
return removeHardBreak(addr, len);
bool
BaseRemoteGDB::insertHardBreak(Addr addr, size_t len)
{
- if (len != sizeof(MachInst))
+ if (!checkBpLen(len))
panic("invalid length\n");
DPRINTF(GDBMisc, "inserting hardware breakpoint at %#x\n", addr);
bool
BaseRemoteGDB::removeHardBreak(Addr addr, size_t len)
{
- if (len != sizeof(MachInst))
+ if (!checkBpLen(len))
panic("invalid length\n");
DPRINTF(GDBMisc, "removing hardware breakpoint at %#x\n", addr);