[Lldb-commits] [lldb] [llvm] [lldb] [lldb-server] Introduce Host/qnx and NativeProcessQNX (PR #97630)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 8 07:03:09 PDT 2024


================
@@ -222,6 +232,148 @@ struct ForkLaunchInfo {
 
 // End of code running in the child process.
 
+#if defined(__QNX__)
+static ::pid_t PosixSpawn(const ForkLaunchInfo &info,
----------------
labath wrote:

This is basically reimplementing `LaunchProcessPosixSpawn` inside `ProcessLauncherPosixFork.cpp`. Instead of shoehorning the `posix_spawn` implementation into ProcessLauncherPosix**Fork** (I assume you're doing this because your os doesn't support `fork`), it would be better to create a separate ProcessLauncher subclass for that. If there are things that can be meaningfully shared between the two implementations, they can go into a separate base class (but I expect that there's more sharing potential with the aforementioned (currently, mac-specific) `LaunchProcessPosixSpawn` implementation.

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


More information about the lldb-commits mailing list