[Lldb-commits] [lldb] [lldb] Adding file and pipe support to lldb_private::MainLoopWindows. (PR #145621)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 27 12:09:04 PDT 2025
ashgti wrote:
> I see. I take it that's because anonymous pipes are created without FILE_FLAG_OVERLAPPED. Btw, my understanding is that an anonymous pipe is just a named pipe with a funny name (at least until windows 10, or something) and some with some hardcoded flags (like the absence of overlapped I/O). This is why lldb creates "anonymous pipes" as named -- so it can enable overlapped I/O. So for internal pipe uses, I think we're safe. It gets trickier for pipes that get passed from the outside, but I wouldn't be surprised if VSCode did something similar -- it's likely it also wants to do some overlapped I/O.
>
> Could you check if that is the case?
>
> I'm not sure what that would mean for the implementation (I like the generality, but I also hate the idea of creating a thread for every pipe object), but I think it'd be good to have know this.
I made a sample binary (https://gist.github.com/ashgti/1649fde8ef28783ace1e414f87a6b680) and it seems `stdin` is opened as an anonymous pipe.
I'm getting `FILE_SYNCHRONOUS_IO_NONALERT` (see https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_mode_information#file_synchronous_io_nonalert) as the file mode, which corresponds to an anonymous pipe.
https://github.com/llvm/llvm-project/pull/145621
More information about the lldb-commits
mailing list