- Implemented support for range stepping with GDB (vCont... packets)

- Refactored some bits of the generic GDB server class, along with the AVR-specific implementation
This commit is contained in:
Nav
2023-09-10 22:27:10 +01:00
parent 1d0f30db7a
commit 7d4ce1050f
42 changed files with 901 additions and 103 deletions

View File

@@ -26,8 +26,13 @@ namespace DebugServer::Gdb::CommandPackets
try {
targetControllerService.stopTargetExecution();
debugSession.connection.writePacket(TargetStopped(Signal::INTERRUPTED));
if (debugSession.activeRangeSteppingSession.has_value()) {
debugSession.terminateRangeSteppingSession(targetControllerService);
}
debugSession.waitingForBreak = false;
debugSession.connection.writePacket(TargetStopped(Signal::INTERRUPTED));
} catch (const Exception& exception) {
Logger::error("Failed to interrupt execution - " + exception.getMessage());

View File

@@ -56,7 +56,7 @@ namespace DebugServer::Gdb::CommandPackets
try {
Logger::debug("Removing breakpoint at address " + std::to_string(this->address));
targetControllerService.removeBreakpoint(TargetBreakpoint(this->address));
debugSession.removeExternalBreakpoint(TargetBreakpoint(this->address), targetControllerService);
debugSession.connection.writePacket(OkResponsePacket());
} catch (const Exception& exception) {

View File

@@ -65,7 +65,7 @@ namespace DebugServer::Gdb::CommandPackets
return;
}
targetControllerService.setBreakpoint(TargetBreakpoint(this->address));
debugSession.setExternalBreakpoint(TargetBreakpoint(this->address), targetControllerService);
debugSession.connection.writePacket(OkResponsePacket());
} catch (const Exception& exception) {