[Lldb-commits] [lldb] [lldb-dap] Spawn debug sever in the build directory. (PR #216078)

via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 13 08:12:54 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

<details>
<summary>Changes</summary>

The debugserver may create files such as the socket in the working directory.

---
Full diff: https://github.com/llvm/llvm-project/pull/216078.diff


1 Files Affected:

- (modified) lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py (+4-1) 


``````````diff
diff --git a/lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py b/lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py
index 22129996ddd3e..6c44781ff81f5 100644
--- a/lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py
+++ b/lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py
@@ -51,6 +51,7 @@ def test_by_port(self):
             str(self.get_debug_server_path()),
             debug_server_args,
             install_remote=False,
+            cwd=self.getBuildDir(),
         )
 
         # Read the port number from the debug server pipe.
@@ -108,7 +109,9 @@ def test_by_illegal_port(self):
         if debug_server.stem == "lldb-server":
             server_args = ["gdbserver", *server_args]
 
-        self.spawnSubprocess(str(debug_server), server_args, install_remote=False)
+        self.spawnSubprocess(
+            str(debug_server), server_args, install_remote=False, cwd=self.getBuildDir()
+        )
 
         pending = session.initialize_and_launch(
             AttachArgs(

``````````

</details>


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


More information about the lldb-commits mailing list