[lldb-dev] [Lldb-commits] [lldb] r167012 - /lldb/branches/windows/source/Host/common/File.cpp

Carlo Kok ck at remobjects.com
Wed Oct 31 11:35:12 PDT 2012


Op 31-10-2012 19:24, Filipe Cabecinhas schreef:
> If you're using SeekFromStart, why did you keep the lseek call?
>

The original code does move the file position at all. It uses lseek to 
get the current position, set the position, read, then restore it to the 
original position, which it looked like the posix part did too.

>     URL:
>     http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Host/common/File.cpp?rev=167012&r1=167011&r2=167012&view=diff
>     ==============================================================================
>     --- lldb/branches/windows/source/Host/common/File.cpp (original)
>     +++ lldb/branches/windows/source/Host/common/File.cpp Tue Oct 30
>     06:55:43 2012
>     @@ -557,6 +557,7 @@
>           return error;
>       #else
>           long cur = ::lseek(m_descriptor, 0, SEEK_CUR);
>     +    SeekFromStart(offset);
>           Error error = Read(buf, num_bytes);
>           if (!error.Fail())
>               SeekFromStart(cur);
>
>
>     _______________________________________________
>     lldb-commits mailing list
>     lldb-commits at cs.uiuc.edu <mailto:lldb-commits at cs.uiuc.edu>
>     http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
>




More information about the lldb-dev mailing list