mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-28 00:40:54 +00:00
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
This commit is contained in:
parent
e243e06cbb
commit
e97eefc9c6
@ -585,7 +585,7 @@ void DwarfDebug::finalizeModuleInfo() {
|
|||||||
// 2.17.3).
|
// 2.17.3).
|
||||||
U.addUInt(U.getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
|
U.addUInt(U.getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
|
||||||
else
|
else
|
||||||
TheCU.setBaseAddress(TheCU.getRanges().front().getStart());
|
U.setBaseAddress(TheCU.getRanges().front().getStart());
|
||||||
U.attachRangesOrLowHighPC(U.getUnitDie(), TheCU.takeRanges());
|
U.attachRangesOrLowHighPC(U.getUnitDie(), TheCU.takeRanges());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
; Test the emission of gmlt-like inlining information into the skeleton unit.
|
||||||
; This allows inline-aware symbolication/backtracing given only the linked
|
; This allows inline-aware symbolication/backtracing given only the linked
|
||||||
@ -65,10 +67,13 @@
|
|||||||
; CHECK: DW_TAG_inlined_subroutine
|
; CHECK: DW_TAG_inlined_subroutine
|
||||||
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "f2<int>"
|
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "f2<int>"
|
||||||
; CHECK-NEXT: DW_AT_ranges
|
; 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-NEXT: DW_AT_call_line {{.*}} (18)
|
||||||
; CHECK-NOT: DW_
|
; CHECK-NOT: DW_
|
||||||
|
|
||||||
|
; RELOCS-NOT: RELOCATION RECORDS FOR [.rela.debug_ranges]
|
||||||
|
|
||||||
; Function Attrs: uwtable
|
; Function Attrs: uwtable
|
||||||
define void @_ZN3foo2f3Ez(...) #0 align 2 {
|
define void @_ZN3foo2f3Ez(...) #0 align 2 {
|
||||||
entry:
|
entry:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user