[Lldb-commits] [PATCH] D28305: [Host] Handle short reads and writes, take 3
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 4 13:51:28 PST 2017
labath added a comment.
The way this deals with it is by using `GetDescriptor()` which extracts the raw fd from FILE *, and then always deals with those. I guess this has the potential of bypassing any libc cache that FILE * may be using. I don't know whether we care about that, but if we do then this (and the previous) patch needs to be completely rethinked.
Note that the current state is not very consistent either File::Read() uses fread() if we have a FILE*, but the offset version of File::Read always uses pread (via GetDescriptor(), as I do in this patch always), as there is no offset version of fread. I think this is a much bigger inconsistency than the one we have here.
https://reviews.llvm.org/D28305
More information about the lldb-commits
mailing list