aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Utility/StringExtractorGDBRemote.cpp
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2022-06-12 08:55:41 +0200
committerMichał Górny <mgorny@moritz.systems>2022-06-24 17:20:23 +0200
commitc18784ba330ac0f57e6ec433cfa8317349c445ff (patch)
treea87eef89f35b84f75e114d4b4efec5b32c53a04a /lldb/source/Utility/StringExtractorGDBRemote.cpp
parente8fe7e930a45764cbb88d9c3fa91ef7dc1ebcc97 (diff)
downloadllvm-c18784ba330ac0f57e6ec433cfa8317349c445ff.zip
llvm-c18784ba330ac0f57e6ec433cfa8317349c445ff.tar.gz
llvm-c18784ba330ac0f57e6ec433cfa8317349c445ff.tar.bz2
[lldb] [llgs] Implement the vKill packet
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
Diffstat (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp')
-rw-r--r--lldb/source/Utility/StringExtractorGDBRemote.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp
index 17ab5ef2..75fc74d 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"))