Oh, forget it. I didn't see that you were keeping the value and returning to that position.<div><br></div><div>Carry on :-)</div><div><br></div><div>  Filipe</div><div class="gmail_extra"><br clear="all">  F<br><br>
<br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 11:35 AM, Carlo Kok <span dir="ltr"><<a href="mailto:ck@remobjects.com" target="_blank">ck@remobjects.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Op 31-10-2012 19:24, Filipe Cabecinhas schreef:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you're using SeekFromStart, why did you keep the lseek call?<br>
<br>
</blockquote>
<br></div>
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.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Host/common/File.cpp?rev=167012&r1=167011&r2=167012&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lldb/branches/windows/<u></u>source/Host/common/File.cpp?<u></u>rev=167012&r1=167011&r2=<u></u>167012&view=diff</a><br>

    ==============================<u></u>==============================<u></u>==================<br>
    --- lldb/branches/windows/source/<u></u>Host/common/File.cpp (original)<br>
    +++ lldb/branches/windows/source/<u></u>Host/common/File.cpp Tue Oct 30<br>
    06:55:43 2012<br>
    @@ -557,6 +557,7 @@<br>
          return error;<br>
      #else<br>
          long cur = ::lseek(m_descriptor, 0, SEEK_CUR);<br>
    +    SeekFromStart(offset);<br>
          Error error = Read(buf, num_bytes);<br>
          if (!error.Fail())<br>
              SeekFromStart(cur);<br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    lldb-commits mailing list<br></div>
    <a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.<u></u>edu</a>><br>
    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-commits</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>