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:
@@ -40,10 +40,6 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
: Packet(rawPacket)
|
||||
{}
|
||||
|
||||
virtual bool requiresBreakpointFlush() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should handle the command for the current active debug session.
|
||||
*
|
||||
|
||||
@@ -28,10 +28,6 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
|
||||
explicit ContinueExecution(const RawPacket& rawPacket);
|
||||
|
||||
bool requiresBreakpointFlush() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
void handle(
|
||||
DebugSession& debugSession,
|
||||
Services::TargetControllerService& targetControllerService
|
||||
|
||||
@@ -9,10 +9,6 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
public:
|
||||
explicit Detach(const RawPacket& rawPacket);
|
||||
|
||||
bool requiresBreakpointFlush() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
void handle(
|
||||
DebugSession& debugSession,
|
||||
Services::TargetControllerService& targetControllerService
|
||||
|
||||
@@ -54,13 +54,6 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
Logger::debug("Handling RemoveBreakpoint packet");
|
||||
|
||||
try {
|
||||
if (debugSession.serverConfig.breakpointCachingEnabled) {
|
||||
debugSession.breakpointAddressesPendingRemoval.insert(this->address);
|
||||
debugSession.connection.writePacket(OkResponsePacket());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Logger::debug("Removing breakpoint at address " + std::to_string(this->address));
|
||||
|
||||
targetControllerService.removeBreakpoint(TargetBreakpoint(this->address));
|
||||
|
||||
@@ -54,18 +54,8 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
Logger::debug("Handling SetBreakpoint packet");
|
||||
|
||||
try {
|
||||
if (
|
||||
!debugSession.serverConfig.breakpointCachingEnabled
|
||||
|| !debugSession.breakpointAddresses.contains(this->address)
|
||||
) {
|
||||
targetControllerService.setBreakpoint(TargetBreakpoint(this->address));
|
||||
}
|
||||
|
||||
if (debugSession.serverConfig.breakpointCachingEnabled) {
|
||||
debugSession.breakpointAddresses.insert(this->address);
|
||||
debugSession.breakpointAddressesPendingRemoval.erase(this->address);
|
||||
}
|
||||
|
||||
targetControllerService.setBreakpoint(TargetBreakpoint(this->address));
|
||||
debugSession.connection.writePacket(OkResponsePacket());
|
||||
|
||||
} catch (const Exception& exception) {
|
||||
|
||||
@@ -23,10 +23,6 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
|
||||
explicit StepExecution(const RawPacket& rawPacket);
|
||||
|
||||
bool requiresBreakpointFlush() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
void handle(
|
||||
DebugSession& debugSession,
|
||||
Services::TargetControllerService& targetControllerService
|
||||
|
||||
Reference in New Issue
Block a user