[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 31 04:08:07 PDT 2024


================
@@ -159,6 +159,40 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(
 GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() =
     default;
 
+void GDBRemoteCommunicationServerPlatform::Proc(
+    const lldb_private::Args &args) {
+  if (!IsConnected())
+    return;
+
+  if (args.GetArgumentCount() > 0) {
+    lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
+    std::optional<uint16_t> port;
+    std::string socket_name;
+    Status error = LaunchGDBServer(args,
+                                   "", // hostname
+                                   pid, port, socket_name);
+    if (error.Success())
+      SetPendingGdbServer(pid, *port, socket_name);
----------------
slydiman wrote:

This code is just moved from lldb-platform.cpp 
GetPacketAndSendResponse() ignores `error` value. GetPacketAndSendResponse() must set the flag `quit` or `interrupt` and update `error`.

https://github.com/llvm/llvm-project/pull/101283


More information about the lldb-commits mailing list