[lldb-dev] [Lldb-commits] [lldb] r167012 - /lldb/branches/windows/source/Host/common/File.cpp
Filipe Cabecinhas
filcab at gmail.com
Wed Oct 31 11:39:16 PDT 2012
Oh, forget it. I didn't see that you were keeping the value and returning
to that position.
Carry on :-)
Filipe
F
On Wed, Oct 31, 2012 at 11:35 AM, Carlo Kok <ck at remobjects.com> wrote:
> 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<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<lldb-commits at cs.uiuc.edu>
>> >
>> http://lists.cs.uiuc.edu/**mailman/listinfo/lldb-commits<http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121031/aa3a3549/attachment.html>
More information about the lldb-dev
mailing list