Implemented disabling of GDB packet acknowledgement, and disabled it by default. The new packetAcknowledgement debug server config param can be used to keep it enabled.

This commit is contained in:
Nav
2024-10-19 23:10:34 +01:00
parent 9b1489fbf2
commit 7a54632966
7 changed files with 73 additions and 14 deletions

View File

@@ -61,6 +61,17 @@ namespace DebugServer::Gdb::CommandPackets
return;
}
if (!debugSession.serverConfig.packetAcknowledgement && packetString.find("QStartNoAckMode") == 0) {
Logger::info("Handling QStartNoAckMode");
/*
* We respond to the command before actually disabling packet acknowledgement, because GDB will send one
* final acknowledgement byte to acknowledge the response.
*/
debugSession.connection.writePacket(OkResponsePacket{});
debugSession.connection.packetAcknowledgement = false;
return;
}
Logger::debug("Unknown GDB RSP packet: " + packetString + " - returning empty response");
// GDB expects an empty response for all unsupported commands