[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 03:35:01 PDT 2024
================
@@ -114,6 +120,218 @@ static Status save_socket_id_to_file(const std::string &socket_id,
return status;
}
+static GDBRemoteCommunicationServerPlatform::PortMap gdbserver_portmap;
+static std::mutex gdbserver_portmap_mutex;
+
+#if defined(_WIN32)
----------------
slydiman wrote:
We can move this code to some windows specific directory. But it is windows specific anyway. Note it contains a lot of `lldb-server platform` specific parameters. We can just pass the socket FD via the command line on non-Windows OS. `lldb-server gdbserver` already supports it with the parameter `--fd`. But it does not work on Windows. acceprt_fd here is a pipe FD which is used to transfer the structure WSAPROTOCOL_INFO. We need to know the child pid to initialize WSAPROTOCOL_INFO. Finally the child process is able to initialize the accepted socket FROM_PROTOCOL_INFO.
https://github.com/llvm/llvm-project/pull/101283
More information about the lldb-commits
mailing list