[llvm] r217338 - DebugInfo: Do not use DW_FORM_GNU_addr_index in skeleton CUs, GDB 7.8 errors on this.

David Blaikie dblaikie at gmail.com
Mon Sep 15 15:51:21 PDT 2014


On Sun, Sep 7, 2014 at 7:47 PM, Eric Christopher <echristo at gmail.com> wrote:

> Might want to comment the limitation above the conditional.
>

Certainly - r217842


>
> -eric
>
>
> On Sun, Sep 7, 2014 at 10:31 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
>> Author: dblaikie
>> Date: Sun Sep  7 12:31:42 2014
>> New Revision: 217338
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=217338&view=rev
>> Log:
>> DebugInfo: Do not use DW_FORM_GNU_addr_index in skeleton CUs, GDB 7.8
>> errors on this.
>>
>> It's probably not a huge deal to not do this - if we could, maybe the
>> address could be reused by a subprogram low_pc and avoid an extra
>> relocation, but it's just one per CU at best.
>>
>> Modified:
>>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
>>     llvm/trunk/test/DebugInfo/X86/cu-ranges.ll
>>
>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=217338&r1=217337&r2=217338&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Sun Sep  7 12:31:42
>> 2014
>> @@ -288,7 +288,7 @@ void DwarfUnit::addSectionOffset(DIE &Di
>>  void DwarfCompileUnit::addLabelAddress(DIE &Die, dwarf::Attribute
>> Attribute,
>>                                         const MCSymbol *Label) {
>>
>> -  if (!DD->useSplitDwarf())
>> +  if (!DD->useSplitDwarf() || !Skeleton)
>>      return addLocalLabelAddress(Die, Attribute, Label);
>>
>>    if (Label)
>>
>> Modified: llvm/trunk/test/DebugInfo/X86/cu-ranges.ll
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/cu-ranges.ll?rev=217338&r1=217337&r2=217338&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/test/DebugInfo/X86/cu-ranges.ll (original)
>> +++ llvm/trunk/test/DebugInfo/X86/cu-ranges.ll Sun Sep  7 12:31:42 2014
>> @@ -1,9 +1,9 @@
>>  ; RUN: llc -split-dwarf=Enable -O0 %s -function-sections
>> -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
>> -; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck
>> --check-prefix=FUNCTION-SECTIONS %s
>> +; RUN: llvm-dwarfdump -debug-dump=abbrev %t | FileCheck
>> --check-prefix=FUNCTION-SECTIONS %s
>>  ; RUN: llvm-readobj --relocations %t | FileCheck
>> --check-prefix=FUNCTION-SECTIONS-RELOCS %s
>>
>>  ; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu
>> -filetype=obj -o %t
>> -; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck
>> --check-prefix=NO-FUNCTION-SECTIONS %s
>> +; RUN: llvm-dwarfdump -debug-dump=abbrev %t | FileCheck
>> --check-prefix=NO-FUNCTION-SECTIONS %s
>>
>>  ; From:
>>  ; int foo (int a) {
>> @@ -21,6 +21,8 @@
>>
>>  ; Without function sections enabled make sure that we have no
>> DW_AT_ranges attribute.
>>  ; NO-FUNCTION-SECTIONS-NOT: DW_AT_ranges
>> +; NO-FUNCTION-SECTIONS: DW_AT_low_pc DW_FORM_addr
>> +; NO-FUNCTION-SECTIONS-NOT: DW_AT_ranges
>>
>>  ; Function Attrs: nounwind uwtable
>>  define i32 @foo(i32 %a) #0 {
>>
>>
>> _______________________________________________
>> 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/20140915/1f3d76e8/attachment.html>


More information about the llvm-commits mailing list