<div dir="ltr">Really sorry about the breakage. <div><br></div><div>Is there anybody who understands what is the issue of using WriteScalarToMemory when the register value is a scalar?</div><div><br></div><div>From my understanding, using WriteScalarToMemory handles the byte swap needed when the Host endianness is different from the Target endianness, which is not done by WriteMemory. Therefor using WriteScalarToMemory is fixing the evaluation of the registers on my out-of-tree target.</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">2016-02-29 11:06 GMT-05:00 Aidan Dodds <span dir="ltr"><<a href="mailto:aidan@codeplay.com" target="_blank">aidan@codeplay.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Sorry about the breakage, and thanks for working on a patch Chaoren.<br>
    Hopefully Marianne will revise her merge request if this fix is
    still important for her.<br>
    <br>
    <div>On 28/02/2016 00:06, Todd Fiala wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div>I brought the state of the lines changed there to what they
        were prior to the change. If you adjusted those same lines, then
        yes that got undone.</div>
      <div><br>
      </div>
      <div>We were failing different tests in
        those files.  Your change may have fixed the new issues on
        Linux, but did not address the new failures on OS X.  The OS X
        bot went green after the revert.</div>
      <div><br>
        -Todd</div>
      <div><br>
        On Feb 27, 2016, at 4:01 PM, Chaoren Lin <<a href="mailto:chaorenl@google.com" target="_blank"></a><a href="mailto:chaorenl@google.com" target="_blank">chaorenl@google.com</a>>
        wrote:<br>
        <br>
      </div>
      <blockquote type="cite">
        <div>
          <div dir="ltr">I thought I fixed it with <a href="http://reviews.llvm.org/D17658" target="_blank"></a><a href="http://reviews.llvm.org/D17658" target="_blank">http://reviews.llvm.org/D17658</a>.
            Did you revert that as well?
            <div class="gmail_extra"><br>
              <div class="gmail_quote">On Sat, Feb 27, 2016 at 3:14 PM,
                Todd Fiala <span dir="ltr"><<a href="mailto:todd.fiala@gmail.com" target="_blank"></a><a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>></span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                  <div dir="ltr">Hi all,
                    <div><br>
                    </div>
                    <div>The new assert was failing on the OS X testbot
                      here:</div>
                    <div><a href="http://lab.llvm.org:8080/green/job/lldb_build_test/" target="_blank">http://lab.llvm.org:8080/green/job/lldb_build_test/</a><br>
                    </div>
                    <div><br>
                    </div>
                    <div>The nag mail didn't make it to you since we
                      have it only fire on the transition from good
                      build to bad build, and Tamas had the privilege of
                      earning that with a minor Xcode breakage just
                      shortly before this issue showed up.  However,
                      that bot as been broken since this change went in.</div>
                    <div><br>
                    </div>
                    <div>I reverted it in r262156.</div>
                    <div><br>
                    </div>
                    <div>Feel free to reapply if you have a suggested
                      fix for the test failure introduced.</div>
                    <div><br>
                    </div>
                    <div>Thanks!</div>
                    <div><br>
                    </div>
                    <div>-Todd</div>
                  </div>
                  <div class="gmail_extra">
                    <div>
                      <div><br>
                        <div class="gmail_quote">On Fri, Feb 26, 2016 at
                          12:08 PM, Chaoren Lin via lldb-commits <span dir="ltr"><<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>></span>
                          wrote:<br>
                          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                            <div dir="ltr">Hmm. Weird. That assert is
                              failing on Linux: <a href="http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833" target="_blank"></a><a href="http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833" target="_blank">http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833</a></div>
                            <div>
                              <div>
                                <div class="gmail_extra"><br>
                                  <div class="gmail_quote">On Fri, Feb
                                    26, 2016 at 9:40 AM, Aidan Dodds via
                                    lldb-commits <span dir="ltr"><<a href="mailto:lldb-commits@lists.llvm.org" target="_blank"></a><a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>></span>
                                    wrote:<br>
                                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author:
                                      aidandodds<br>
                                      Date: Fri Feb 26 11:40:50 2016<br>
                                      New Revision: 262041<br>
                                      <br>
                                      URL: <a href="http://llvm.org/viewvc/llvm-project?rev=262041&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=262041&view=rev</a><br>
                                      Log:<br>
                                      Fix bug with register values byte
                                      order in expression evaluation.<br>
                                      <br>
                                      The evaluation of expressions
                                      containing register values was
                                      broken for targets for which
                                      endianness differs from host.<br>
                                      <br>
                                      Committed on behalf of: mamai <<a href="mailto:marianne.mailhot.sarrasin@gmail.com" target="_blank"></a><a href="mailto:marianne.mailhot.sarrasin@gmail.com" target="_blank">marianne.mailhot.sarrasin@gmail.com</a>><br>
                                      <br>
                                      Differential revision: <a href="http://reviews.llvm.org/D17167" rel="noreferrer" target="_blank"></a><a href="http://reviews.llvm.org/D17167" target="_blank">http://reviews.llvm.org/D17167</a><br>
                                      <br>
                                      Modified:<br>
                                         
                                      lldb/trunk/source/Expression/Materializer.cpp<br>
                                      <br>
                                      Modified:
                                      lldb/trunk/source/Expression/Materializer.cpp<br>
                                      URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff</a><br>
==============================================================================<br>
                                      ---
                                      lldb/trunk/source/Expression/Materializer.cpp
                                      (original)<br>
                                      +++
                                      lldb/trunk/source/Expression/Materializer.cpp
                                      Fri Feb 26 11:40:50 2016<br>
                                      @@ -26,6 +26,7 @@<br>
                                       #include
                                      "lldb/Target/StackFrame.h"<br>
                                       #include "lldb/Target/Target.h"<br>
                                       #include "lldb/Target/Thread.h"<br>
                                      +#include
                                      "lldb/Utility/LLDBAssert.h"<br>
                                      <br>
                                       using namespace lldb_private;<br>
                                      <br>
                                      @@ -1275,9 +1276,14 @@ public:<br>
                                             
                                       m_register_contents.reset(new
                                      DataBufferHeap(register_data.GetDataStart(),
                                      register_data.GetByteSize()));<br>
                                      <br>
                                               Error write_error;<br>
                                      -<br>
                                      -       
                                      map.WriteMemory(load_addr,
                                      register_data.GetDataStart(),
                                      register_data.GetByteSize(),
                                      write_error);<br>
                                      -<br>
                                      +<br>
                                      +        Scalar scalar;<br>
                                      +       
                                      reg_value.GetScalarValue(scalar);<br>
                                      +<br>
                                      +       
                                      lldbassert(scalar.GetByteSize() ==
                                      register_data.GetByteSize());<br>
                                      +<br>
                                      +       
                                      map.WriteScalarToMemory(load_addr,
                                      scalar, scalar.GetByteSize(),
                                      write_error);<br>
                                      +<br>
                                               if
                                      (!write_error.Success())<br>
                                               {<br>
                                                 
                                       err.SetErrorStringWithFormat("couldn't
                                      write the contents of register %s:
                                      %s", <a href="http://m_register_info.name" rel="noreferrer" target="_blank">m_register_info.name</a>,
                                      write_error.AsCString());<br>
                                      <br>
                                      <br>
_______________________________________________<br>
                                      lldb-commits mailing list<br>
                                      <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
                                      <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
                                    </blockquote>
                                  </div>
                                  <br>
                                </div>
                              </div>
                            </div>
                            <br>
_______________________________________________<br>
                            lldb-commits mailing list<br>
                            <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
                            <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
                            <br>
                          </blockquote>
                        </div>
                        <br>
                        <br clear="all"><span class=""><font color="#888888">
                        <div><br>
                        </div>
                      </font></span></div><span class=""><font color="#888888">
                    </font></span></div><span class=""><font color="#888888">
                    <span><font color="#888888">-- <br>
                        <div>
                          <div dir="ltr">-Todd</div>
                        </div>
                      </font></span></font></span></div><span class=""><font color="#888888">
                </font></span></blockquote><span class=""><font color="#888888">
              </font></span></div><span class=""><font color="#888888">
              <br>
            </font></span></div>
          </div>
        </div>
      </blockquote>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div></div></div>