[Lldb-commits] [lldb] [lldb][windows] add a Windows FifoFile implementation (PR #185894)

via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 11 08:24:02 PDT 2026


================
@@ -24,17 +28,83 @@ using namespace llvm;
 
 namespace lldb_dap {
 
-FifoFile::FifoFile(StringRef path) : m_path(path) {}
+FifoFile::FifoFile(StringRef path, lldb::pipe_t pipe) : m_path(path) {
+#ifdef _WIN32
+  if (pipe == INVALID_HANDLE_VALUE)
+    pipe = CreateFileA(m_path.c_str(), GENERIC_READ | GENERIC_WRITE, 0, NULL,
+                       OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
----------------
Nerixyz wrote:

This is used to connect to the named pipe, right? If so, we should have the same assert that the path starts with `\\.\pipe\` here.

I'm guessing `FILE_FLAG_OVERLAPPED` has to be specified to allow reads and writes to happen asynchronously even if we never specify a `OVERLAPPED`.

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


More information about the lldb-commits mailing list