From: David Blaikie Date: Sat, 2 May 2015 02:31:49 +0000 (+0000) Subject: DebugInfo: Use low_pc relative debug_ranges under fission when the CU has a low_pc X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=e97eefc9c6068f837e76be9c47b264c8384f36c3 DebugInfo: Use low_pc relative debug_ranges under fission when the CU has a low_pc Seems we were setting the base address on the wrong DwarfCompileUnit object so it wasn't being used when generating the ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236377 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4f2b47f0e6f..4fe4f26c923 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -585,7 +585,7 @@ void DwarfDebug::finalizeModuleInfo() { // 2.17.3). U.addUInt(U.getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0); else - TheCU.setBaseAddress(TheCU.getRanges().front().getStart()); + U.setBaseAddress(TheCU.getRanges().front().getStart()); U.attachRangesOrLowHighPC(U.getUnitDie(), TheCU.takeRanges()); } } diff --git a/test/DebugInfo/X86/fission-inline.ll b/test/DebugInfo/X86/fission-inline.ll index 23118573ea0..53e782756ca 100644 --- a/test/DebugInfo/X86/fission-inline.ll +++ b/test/DebugInfo/X86/fission-inline.ll @@ -1,4 +1,6 @@ -; RUN: llc -split-dwarf=Enable -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s +; RUN: llc -split-dwarf=Enable -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj > %t +; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s +; RUN: llvm-objdump -r %t | FileCheck --check-prefix=RELOCS %s ; Test the emission of gmlt-like inlining information into the skeleton unit. ; This allows inline-aware symbolication/backtracing given only the linked @@ -65,10 +67,13 @@ ; CHECK: DW_TAG_inlined_subroutine ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "f2" ; CHECK-NEXT: DW_AT_ranges -; CHECK-NEXT: DW_AT_call_file +; CHECK-NOT: {{DW_AT|DW_TAG|NULL}} +; CHECK: DW_AT_call_file ; CHECK-NEXT: DW_AT_call_line {{.*}} (18) ; CHECK-NOT: DW_ +; RELOCS-NOT: RELOCATION RECORDS FOR [.rela.debug_ranges] + ; Function Attrs: uwtable define void @_ZN3foo2f3Ez(...) #0 align 2 { entry: