[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 25 00:34:09 PST 2024


================
@@ -1196,6 +1202,62 @@ def terminate(self):
             self.process.wait()
             self.process = None
 
+    @classmethod
+    def launch(
+        cls, executable: str, /, connection=None, log_file=None, env=None
+    ) -> tuple[subprocess.Popen, str]:
+        adaptor_env = os.environ.copy()
+        if env:
+            adaptor_env.update(env)
+
+        if log_file:
+            adaptor_env["LLDBDAP_LOG"] = log_file
+
+        if os.uname().sysname == "Darwin":
+            adaptor_env["NSUnbufferedIO"] = "YES"
----------------
labath wrote:

What is this for? Could it be replaced by a well-positioned `flush()` call?

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


More information about the lldb-commits mailing list