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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to