================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to