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

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 7 05:57:57 PDT 2024


================
@@ -254,6 +445,65 @@ int main_platform(int argc, char *argv[]) {
   lldb_private::Args inferior_arguments;
   inferior_arguments.SetArguments(argc, const_cast<const char **>(argv));
 
+  if (fd != kInvalidFD) {
+    // Child process will handle the connection and exit.
+    Log *log = GetLog(LLDBLog::Platform);
+    if (!listen_host_port.empty()) {
+      LLDB_LOGF(log, "lldb-platform child: "
+                     "ambiguous parameters --listen and --fd");
+      return socket_error;
+    }
+
+    NativeSocket socket;
+#ifdef _WIN32
----------------
labath wrote:

And I think this could be a static method on the class I described above. `CompleteReceiving` ?

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


More information about the lldb-commits mailing list