[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
This commit is contained in:
Michał Górny
2022-06-12 08:55:41 +02:00
parent e8fe7e930a
commit c18784ba33
5 changed files with 101 additions and 1 deletions

View File

@@ -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"))