This turns out to have been tripping a bug in darwin gdb. Basically the piece of data it was trying to print out was at address 0 in the object file after my change. This only happened to work before because we were putting the debug sections in the object file before the data and so everything had a non-zero address. A possible other gain to the patch is that the debug sections are at the end of the object now instead of the beginning hopefully helping the default linking case on darwin.<div>
<br></div><div>Bill: If anyone actually runs into this on darwin we can work around it during debug info emission, but lldb manages to work this correctly so I'm not too fussed about it.<br><div><br></div><div>-eric</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 23, 2012 at 3:06 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey awesome. I'll want to investigate since.. it really shouldn't have a dependency there.<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>-eric</div></font></span><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 23, 2012 at 1:48 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Mon, Nov 19, 2012 at 11:43 AM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br>


> Author: echristo<br>
> Date: Mon Nov 19 13:43:59 2012<br>
> New Revision: 168321<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=168321&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=168321&view=rev</a><br>
> Log:<br>
> Move section label emission to module end. Nothing should be<br>
> depending on them being emitted before the text and/or data<br>
> sections and testing didn't uncover any.<br>
<br>
</div>Turns out testing kind of did uncover some. Bisection points to this<br>
change as the cause of the regression of the gdb test suite<br>
gdb.cp/hang.exp test case.<br>
* logs: <a href="http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb/builds/39/steps/test-gdb-1472-testsuite/logs/gdb.log" target="_blank">http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb/builds/39/steps/test-gdb-1472-testsuite/logs/gdb.log</a><br>


* Specific failures:<br>
<a href="http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb/builds/37/steps/test-gdb-1472-testsuite/logs/tests.FAIL" target="_blank">http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb/builds/37/steps/test-gdb-1472-testsuite/logs/tests.FAIL</a><br>


* source exp: <a href="http://llvm.org/viewvc/llvm-project/clang-tests-external/trunk/gdb/7.5/gdb/testsuite/gdb.cp/hang.exp?view=markup" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tests-external/trunk/gdb/7.5/gdb/testsuite/gdb.cp/hang.exp?view=markup</a><br>


<br>
I can dig into this further if you like, but thought you might see<br>
what's going on here at a glance.<br>
<span><font color="#888888"><br>
- David<br>
</font></span><div><div><br>
><br>
> Modified:<br>
>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
><br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=168321&r1=168320&r2=168321&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=168321&r1=168320&r2=168321&view=diff</a><br>


> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Nov 19 13:43:59 2012<br>
> @@ -791,9 +791,6 @@<br>
>    // Tell MMI that we have debug info.<br>
>    MMI->setDebugInfoAvailability(true);<br>
><br>
> -  // Emit initial sections.<br>
> -  EmitSectionLabels();<br>
> -<br>
>    // Prime section data.<br>
>    SectionMap.insert(Asm->getObjFileLowering().getTextSection());<br>
>  }<br>
> @@ -876,6 +873,9 @@<br>
>    // Compute DIE offsets and sizes.<br>
>    computeSizeAndOffsets();<br>
><br>
> +  // Emit initial sections.<br>
> +  EmitSectionLabels();<br>
> +<br>
>    // Emit all the DIEs into a debug info section<br>
>    emitDebugInfo();<br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>