[llvm-commits] [llvm] r168321 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Eric Christopher echristo at gmail.com
Mon Nov 26 08:17:39 PST 2012


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.

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.

-eric


On Fri, Nov 23, 2012 at 3:06 PM, Eric Christopher <echristo at gmail.com>wrote:

> Hey awesome. I'll want to investigate since.. it really shouldn't have a
> dependency there.
>
> -eric
>
>
> On Fri, Nov 23, 2012 at 1:48 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>> On Mon, Nov 19, 2012 at 11:43 AM, Eric Christopher <echristo at gmail.com>
>> wrote:
>> > Author: echristo
>> > Date: Mon Nov 19 13:43:59 2012
>> > New Revision: 168321
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=168321&view=rev
>> > Log:
>> > Move section label emission to module end. Nothing should be
>> > depending on them being emitted before the text and/or data
>> > sections and testing didn't uncover any.
>>
>> Turns out testing kind of did uncover some. Bisection points to this
>> change as the cause of the regression of the gdb test suite
>> gdb.cp/hang.exp test case.
>> * logs:
>> http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb/builds/39/steps/test-gdb-1472-testsuite/logs/gdb.log
>> * Specific failures:
>>
>> http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb/builds/37/steps/test-gdb-1472-testsuite/logs/tests.FAIL
>> * source exp:
>> http://llvm.org/viewvc/llvm-project/clang-tests-external/trunk/gdb/7.5/gdb/testsuite/gdb.cp/hang.exp?view=markup
>>
>> I can dig into this further if you like, but thought you might see
>> what's going on here at a glance.
>>
>> - David
>>
>> >
>> > Modified:
>> >     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> >
>> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=168321&r1=168320&r2=168321&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Nov 19
>> 13:43:59 2012
>> > @@ -791,9 +791,6 @@
>> >    // Tell MMI that we have debug info.
>> >    MMI->setDebugInfoAvailability(true);
>> >
>> > -  // Emit initial sections.
>> > -  EmitSectionLabels();
>> > -
>> >    // Prime section data.
>> >    SectionMap.insert(Asm->getObjFileLowering().getTextSection());
>> >  }
>> > @@ -876,6 +873,9 @@
>> >    // Compute DIE offsets and sizes.
>> >    computeSizeAndOffsets();
>> >
>> > +  // Emit initial sections.
>> > +  EmitSectionLabels();
>> > +
>> >    // Emit all the DIEs into a debug info section
>> >    emitDebugInfo();
>> >
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121126/828154c1/attachment.html>


More information about the llvm-commits mailing list