| Issue |
178194
|
| Summary |
[lldb-dap][windows] fails to startup on Windows when using the stdin as input
|
| Labels |
lldb-dap
|
| Assignees |
|
| Reporter |
charles-zablit
|
When running a just build `lldb-dap`, it fails to run on Windows when starting it with no arguments:
```bash
$> ./llvm-build/debug-oft/bin/lldb-dap.exe
DAP session error: DAP Loop terminated due to an internal error, see DAP Logs for more information.
```
I have traced it down to this check https://github.com/llvm/llvm-project/blob/8b93eeef74d89fb6c68e7be6b792b1dc633b1c74/lldb/source/Host/windows/MainLoopWindows.cpp#L250C5-L250C39.
```cpp
DWORD file_type = GetFileType(waitable_handle);
if (file_type != FILE_TYPE_PIPE) {
error = Status::FromErrorStringWithFormat("Unsupported file type %ld",
file_type);
return nullptr;
}
```
`file_type` is a `FILE_TYPE_CHAR`, since it's using the Console's as STDIN.
This check was introduced in https://github.com/llvm/llvm-project/commit/1a7b7e24bcc1041ae0fb90abcfb73d36d76f4a07#diff-47bab2a8f9d881d5d93e936390d49287096c6be07666a77610407e288dc7f394.
@ashgti can we relax the check to also allow `FILE_TYPE_CHAR`?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs