From c18784ba330ac0f57e6ec433cfa8317349c445ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 12 Jun 2022 08:55:41 +0200 Subject: [lldb] [llgs] Implement the vKill packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement the support for the vKill packet. This is the modern packet used by the GDB Remote Serial Protocol to kill one of the debugged processes. Unlike the `k` packet, it has well-defined semantics. The `vKill` packet takes the PID of the process to kill, and always replies with an `OK` reply (rather than the exit status, as LLGS does for `k` packets at the moment). Additionally, unlike the `k` packet it does not cause the connection to be terminated once the last process is killed — the client needs to close it explicitly. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D127667 --- lldb/source/Utility/StringExtractorGDBRemote.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp') diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index 17ab5ef21f58..75fc74de4e21 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -372,6 +372,8 @@ StringExtractorGDBRemote::GetServerPacketType() const { return eServerPacketType_vCont; if (PACKET_MATCHES("vCont?")) return eServerPacketType_vCont_actions; + if (PACKET_STARTS_WITH("vKill;")) + return eServerPacketType_vKill; if (PACKET_STARTS_WITH("vRun;")) return eServerPacketType_vRun; if (PACKET_MATCHES("vStopped")) -- cgit v1.2.3