<font><span style="line-height:normal;background-color:rgba(255,255,255,0)">> As for your patch, am I correct in thinking that I should ignore the history in that review? </span></font><div><font><span style="line-height:normal"><br>
</span></font></div><div><font><span style="line-height:normal">Yeah, sorry. I need to clear arc out.<br></span></font><br>> <span style="font-size:small;line-height:normal">Can you explain the change to me? What values were you seeing for sh_entsize and sh_addralign?</span></div>
<div><font><span style="line-height:normal"><br></span></font></div><div><font><span style="line-height:normal">On x64, both were 16. On i386, entsize was 4, addralign was 16. The size of the .plt entries are 16 in each case.</span></font></div>
<div><font><span style="line-height:normal"><br></span></font></div><div><font><span style="line-height:normal">Thanks!<span></span><br></span></font><br>On Friday, August 16, 2013, Kaylor, Andrew wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Mike,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">A variation of reloc-fix-32.patch was committed today by Richard Mitton.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I need to do something with stack-fix-32.patch. If I’m reading the documentation correctly, it appears that stack frames really do need to be 8-byte aligned
in Darwin even for 32-bit code.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Unfortunately, we’re using the same ABI plugin for 32-bit x86 code on Darwin and Linux and at the level where this check is performed we don’t know which we’re
looking at. As far as I know, there really isn’t a significant difference between the two scenarios, so I don’t think we’d want a totally separate ABI plug-in. I just need to see if there’s an easy way to give it a little target information when it’s created
so it can handle the special cases.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">As for your patch, am I correct in thinking that I should ignore the history in that review? Can you explain the change to me? What values were you seeing
for sh_entsize and sh_addralign?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-Andy<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Michael Sartain [mailto:<a href="javascript:_e({}, 'cvml', 'mikesart@gmail.com');" target="_blank">mikesart@gmail.com</a>]
<br>
<b>Sent:</b> Thursday, August 15, 2013 1:07 PM<br>
<b>To:</b> Greg Clayton; Kaylor, Andrew<br>
<b>Cc:</b> <a href="javascript:_e({}, 'cvml', 'lldb-dev@cs.uiuc.edu');" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<b>Subject:</b> Re: [lldb-dev] lldb test failures on 32bit<u></u><u></u></span></p>
<p><u></u> <u></u></p>
<div>
<div>
<p>I realized Andrew's reloc-fix-32.patch & stack-fix-32.patch weren't checked in and I didn't have them. Applying both of those with my patch below allows me to step over the 32-bit printf() calls now.<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p>Are those patches what you hope to check in at some point Andrew?<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p>And please let me know if it's ok to check this in:<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p><a href="http://llvm-reviews.chandlerc.com/D1189" target="_blank">http://llvm-reviews.chandlerc.com/D1189</a><u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p>Thanks!<u></u><u></u></p>
</div>
<div>
<p> -Mike<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<p>On Thu, Aug 15, 2013 at 10:39 AM, Michael Sartain <<a>mikesart@gmail.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p>On Tue, Aug 13, 2013 at 6:22 PM, Michael Sartain <<a>mikesart@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<div>
<div>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p>Unwind info does exist for addresses in main(), and all of this works as expected in x64.<u></u><u></u></p>
</div>
<div>
<div>
<div>
<div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p>I'll start debugging where this is failing...<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p><u></u> <u></u></p>
</div>
</div>
<div>
<p>For x86 elf files, the plt_entsize wasn't being rounded to the proper alignment - this was causing the .plt symbols to be incorrect, along with unwind info, etc. This patch fixes that:<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p><a href="http://llvm-reviews.chandlerc.com/D1189" target="_blank">http://llvm-reviews.chandlerc.com/D1189</a><u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p>The next problem is we're using the x64 register set, but then calling into the i386 ABI. Ie, this call:<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<div>
<p> 246| addr_t pc;<u></u><u></u></p>
</div>
<div>
<p> 247+> if (!ReadGPRValue (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc))<u></u><u></u></p>
</div>
<div>
<p> 248| {<u></u><u></u></p>
</div>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<p>Winds up here:<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
<div>
<div>
<p>1092| ExecutionContext exe_ctx(m_thread.shared_from_this());<u></u><u></u></p>
</div>
<div>
<p>1093| Process *process = exe_ctx.GetProcessPtr();<u></u><u></u></p>
</div>
<div>
<p>1094| if (have_unwindplan_regloc == false)<u></u><u></u></p>
</div>
<div>
<p>1095| {<u></u><u></u></p>
</div>
<div>
<p>1096| // If a volatile register is being requested, we don't want to forward the next frame's register contents<u></u><u></u></p>
</div>
<div>
<p>1097| // up the stack -- the register is not retrievable at this frame.<u></u><u></u></p>
</div>
<div>
<p>1098| ABI *abi = process ? process->GetABI().get() : NULL;<u></u><u></u></p>
</div>
<div>
<p>1099| if (abi)<u></u><u></u></p>
</div>
<div>
<p>1100| {<u></u><u></u></p>
</div>
<div>
<p>1101+> const RegisterInfo *reg_info = GetRegisterInfoAtIndex(lldb_regnum);<u></u><u></u></p>
</div>
<div>
<p>1102| if (reg_info && abi->RegisterIsVolatile (reg_info))<u></u><u></u></p>
</div>
<div>
<p>1103| {<u></u><u></u></p>
</div>
<div>
<p>1104| UnwindLogMsg ("did not supply reg location for %d (%s) because it is volatile",<u></u><u></u></p>
</div>
<div>
<p>1105| lldb_regnum, reg_info->name ? reg_info->name : "??");<u></u><u></u></p>
</div>
<div>
<p></p></div></div></div></div></div></blockquote></div></div></div></div>
</div>
</blockquote></div>