When running a just build lldb-dap, it fails to run on Windows when starting it with no arguments:
$> ./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.
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 1a7b7e2#diff-47bab2a8f9d881d5d93e936390d49287096c6be07666a77610407e288dc7f394.
@ashgti can we relax the check to also allow FILE_TYPE_CHAR?
When running a just build
lldb-dap, it fails to run on Windows when starting it with no arguments:I have traced it down to this check https://github.com/llvm/llvm-project/blob/8b93eeef74d89fb6c68e7be6b792b1dc633b1c74/lldb/source/Host/windows/MainLoopWindows.cpp#L250C5-L250C39.
DWORD file_type = GetFileType(waitable_handle); if (file_type != FILE_TYPE_PIPE) { error = Status::FromErrorStringWithFormat("Unsupported file type %ld", file_type); return nullptr; }file_typeis aFILE_TYPE_CHAR, since it's using the Console's as STDIN.This check was introduced in 1a7b7e2#diff-47bab2a8f9d881d5d93e936390d49287096c6be07666a77610407e288dc7f394.
@ashgti can we relax the check to also allow
FILE_TYPE_CHAR?