[Lldb-commits] [lldb] [lldb] Implement JSON RPC (newline delimited) Transport (PR #143946)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 13 09:25:58 PDT 2025
ashgti wrote:
> If this is a feature you actually rely on, we should check the fd is valid before we use it. As in: check and if it's invalid early return an error, instead of getting all the way to reading from it.
The start of the `ReadFull` helper is checking `IsValid()`:
```
static Expected<std::string>
ReadFull(IOObject &descriptor, size_t length,
std::optional<std::chrono::microseconds> timeout = std::nullopt) {
if (!descriptor.IsValid())
return llvm::make_error<TransportInvalidError>();
```
The `IOObject` in the test should be a `NativeFile`, I wonder if there is a problem in the windows implementation of that?
https://github.com/llvm/llvm-project/pull/143946
More information about the lldb-commits
mailing list