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:
Nav
2023-04-01 19:06:57 +01:00
parent b4046e8ded
commit 2d934f7ea5
12 changed files with 1 additions and 107 deletions

View File

@@ -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();
}
}