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

Filipe Cabecinhas filcab at gmail.com
Wed Oct 31 11:24:43 PDT 2012


If you're using SeekFromStart, why did you keep the lseek call?

Regards,

  Filipe



On Tue, Oct 30, 2012 at 4:55 AM, Carlo Kok <ck at remobjects.com> wrote:

> Author: carlokok
> Date: Tue Oct 30 06:55:43 2012
> New Revision: 167012
>
> URL: http://llvm.org/viewvc/llvm-project?rev=167012&view=rev
> Log:
> Windows fix: "File" doesn't actually seek when reading, make it always run
> from the start of the file instead of the given offset.
>
> Modified:
>     lldb/branches/windows/source/Host/common/File.cpp
>
> Modified: lldb/branches/windows/source/Host/common/File.cpp
> 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
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20121031/8256505b/attachment.html>


More information about the lldb-commits mailing list