From 38cf357d85d98dd095b1e813425293bd5f5bafbc Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 9 Dec 2024 15:13:52 -0800 Subject: [PATCH] GdbServer: Implement support for `$vKill` This is the command used when the `k` argument is passed to gdb. There is nothing to do once this is received other than "kill" as quickly as possible. The absolute way to ensure this is using SIGKILL. No way to do a `r` command after `k` yet, but might be possible. --- Source/Tools/LinuxEmulation/LinuxSyscalls/GdbServer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/GdbServer.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/GdbServer.cpp index 335b161c90..19f53b36c3 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/GdbServer.cpp +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/GdbServer.cpp @@ -1118,7 +1118,10 @@ GdbServer::HandledPacketType GdbServer::CommandMultiLetterV(const fextl::string& return HandlevFile(packet); } - // TODO: vKill + if (packet.starts_with("vKill")) { + tgkill(::getpid(), ::getpid(), SIGKILL); + } + // TODO: vRun // TODO: vStopped