<div dir="ltr"><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"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px">An eventual goal is to abstract a dynamic register set that can be used consistently for native local and remote debugging in a platform-independent manner.  Also, for core file support across platforms, we’ll want a register set hierarchy that is distinct from platform dependencies like ProcessMonitor.</span></blockquote>

<div><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px"><br></span></div><div><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px">Does it make sense for me to tackle this right now instead of making what I assume would be temporary fixes to </span><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px">RegisterContext_x86_64? I assume doing the larger correct fix would take care of Greg's other concerns as well? Ie, this: </span><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px">“The DWARF and GCC register numbers need to use the i386 register numbering schemes otherwise all info parsed from EH frame and DWARF will be incorrect when they don't match up. – Greg Clayton”.</span></div>

<div><br></div><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"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px">Greg provided a skeleton patch for this purpose on the lists.  </span></blockquote>

<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"><br></span></font></div><div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px">Does anyone have a pointer to this? I poked around a bit didn't find it.</span></font></div>

<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"><br></span></font></div><div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px">For what it's worth, our most common use case is 64-bit build of LLDB debugging i386 targets with some debugging of 64-bit apps using a 64-bit LLDB build. (Ie, debugging lldb with lldb).</span></font></div>

<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"><br></span></font></div><div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px">Thanks.</span></font></div><div>

<font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"> -Mike</span></font></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 23, 2013 at 7:59 AM, Thirumurthi, Ashok <span dir="ltr"><<a href="mailto:ashok.thirumurthi@intel.com" target="_blank">ashok.thirumurthi@intel.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 lang="EN-US" link="blue" vlink="purple">
<div>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Go for it, Michael!<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">FYI, the x86_64 build of LLDB will have limited success with i386 inferiors, but it’s a pretty good starting point (i.e. test/functionalities/registers passes). 
 In this case, ptrace calls populate the 64-bit register set, and the RegisterContext_x86_64 class uses offsetof to associate the i386 register set with the LS bytes of the associated 64-bit registers.  However, this isn’t correct because “The DWARF and GCC
 register numbers need to use the i386 register numbering schemes otherwise all info parsed from EH frame and DWARF will be incorrect when they don't match up. – Greg Clayton”.<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">The i386 build of LLDB should use RegisterContext_i386.  Similarly, a future remote i386 target should use RegisterContext_i386.  However, this class is just
 stubbed in.  <u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">An eventual goal is to abstract a dynamic register set that can be used consistently for native local and remote debugging in a platform-independent manner. 
 Also, for core file support across platforms, we’ll want a register set hierarchy that is distinct from platform dependencies like ProcessMonitor.  This was implemented for MachO, and Greg provided a skeleton patch for this purpose on the lists.  Cheers,<u></u><u></u></span></p>


<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p><u></u><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><span>-<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:'Times New Roman'">       
</span></span></span><u></u><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Ashok<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div style="border-style:solid none none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0in 0in">
<p class=""><b><span style="font-size:10pt;font-family:Tahoma,sans-serif">From:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif"> <a href="mailto:lldb-dev-bounces@cs.uiuc.edu" target="_blank">lldb-dev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:lldb-dev-bounces@cs.uiuc.edu" target="_blank">lldb-dev-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Michael Sartain<br>
<b>Sent:</b> Friday, August 23, 2013 12:49 AM<br>
<b>To:</b> <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<b>Subject:</b> [lldb-dev] register read on 32-bit Linux<u></u><u></u></span></p>
</div><div class="im">
<p class=""><u></u> <u></u></p>
<div>
<p class="">This is currently calling into the POSIX RegisterContext_x86_64 and returning all the 64-bit registers.<u></u><u></u></p>
<div>
<p class=""><u></u> <u></u></p>
</div>
<div>
<p class="">I'm guessing this is known already. Curious if someone is already working on this or has a plan for fixing it before I jump in?<u></u><u></u></p>
</div>
<div>
<p class=""><u></u> <u></u></p>
</div>
<div>
<p class="">Thanks!<u></u><u></u></p>
</div>
</div>
</div></div>
</div>

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