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 <[email protected]> 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 >> [email protected] >> <mailto:[email protected].**edu<[email protected]> >> > >> >> http://lists.cs.uiuc.edu/**mailman/listinfo/lldb-commits<http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits> >> >> >> >
_______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
