Removed breakpoint caching in GDB server - it's not needed!
GDB can be configured to avoid needlessly updating breakpoints on the target
This commit is contained in:
@@ -184,10 +184,6 @@ namespace Bloom::DebugServer::Gdb
|
||||
const auto commandPacket = this->waitForCommandPacket();
|
||||
|
||||
if (commandPacket) {
|
||||
if (this->debugServerConfig.breakpointCachingEnabled && commandPacket->requiresBreakpointFlush()) {
|
||||
this->flushBreakpointRemovals();
|
||||
}
|
||||
|
||||
commandPacket->handle(this->activeDebugSession.value(), this->targetControllerService);
|
||||
}
|
||||
|
||||
@@ -372,28 +368,4 @@ namespace Bloom::DebugServer::Gdb
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void GdbRspDebugServer::flushBreakpointRemovals() {
|
||||
Logger::debug(
|
||||
"Removing " + std::to_string(this->activeDebugSession->breakpointAddressesPendingRemoval.size())
|
||||
+ " breakpoint(s)"
|
||||
);
|
||||
|
||||
for (const auto& breakpointAddress : this->activeDebugSession->breakpointAddressesPendingRemoval) {
|
||||
try {
|
||||
Logger::debug("Removing breakpoint at address " + std::to_string(breakpointAddress));
|
||||
|
||||
this->targetControllerService.removeBreakpoint(Targets::TargetBreakpoint(breakpointAddress));
|
||||
this->activeDebugSession->breakpointAddresses.erase(breakpointAddress);
|
||||
|
||||
} catch (const Exception& exception) {
|
||||
Logger::error(
|
||||
"Failed to remove breakpoint at address " + std::to_string(breakpointAddress) + " from target - "
|
||||
+ exception.getMessage()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
this->activeDebugSession->breakpointAddressesPendingRemoval.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user