From b781900a3f8d05a31eb1633832a7c95e34841db5 Mon Sep 17 00:00:00 2001 From: Nav Date: Thu, 8 Apr 2021 20:41:22 +0100 Subject: [PATCH] Added support for GDB RSP detach packet --- src/DebugServers/GdbRsp/GdbRspDebugServer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp b/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp index bb9302ec..9410b0f9 100644 --- a/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp +++ b/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp @@ -174,6 +174,10 @@ void GdbRspDebugServer::handleGdbPacket(CommandPacket& packet) { // Status report this->clientConnection->writePacket(TargetStopped(Signal::TRAP)); + } else if (packetString[0] == 'D') { + // Detach packet - there's not really anything we need to do here, so just respond with an OK + this->clientConnection->writePacket(ResponsePacket({'O', 'K'})); + } else if (packetString.find("qAttached") == 0) { Logger::debug("Handling qAttached"); this->clientConnection->writePacket(ResponsePacket({1}));