summaryrefslogtreecommitdiff
path: root/test/DebugInfo/X86/fission-ranges.ll
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-25 01:44:02 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-25 01:44:02 +0000
commitb13d54f5880b2dafadd89182ee9adaff11fa9cf3 (patch)
tree13bb06196737d105a47493ce7045cf68ff6bfc95 /test/DebugInfo/X86/fission-ranges.ll
parent6cfebbd64d6a4dc80706d8f8eba066d3fb8b1749 (diff)
downloadllvm-b13d54f5880b2dafadd89182ee9adaff11fa9cf3.tar.gz
llvm-b13d54f5880b2dafadd89182ee9adaff11fa9cf3.tar.bz2
llvm-b13d54f5880b2dafadd89182ee9adaff11fa9cf3.tar.xz
DebugInfo: Support debug_loc under fission
Implement debug_loc.dwo, as well as llvm-dwarfdump support for dumping this section. Outlined in the DWARF5 spec and http://gcc.gnu.org/wiki/DebugFission the debug_loc.dwo section has more variation than the standard debug_loc, allowing 3 different forms of entry (plus the end of list entry). GCC seems to, and Clang certainly, only use one form, so I've just implemented dumping support for that for now. It wasn't immediately obvious that there was a good refactoring to share the implementation of dumping support between debug_loc and debug_loc.dwo, so they're separate for now - ideas welcome or I may come back to it at some point. As per a comment in the code, we could choose different forms that may reduce the number of debug_addr entries we emit, but that will require further study. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo/X86/fission-ranges.ll')
-rw-r--r--test/DebugInfo/X86/fission-ranges.ll39
1 files changed, 32 insertions, 7 deletions
diff --git a/test/DebugInfo/X86/fission-ranges.ll b/test/DebugInfo/X86/fission-ranges.ll
index b95038bacc..a48896f5a5 100644
--- a/test/DebugInfo/X86/fission-ranges.ll
+++ b/test/DebugInfo/X86/fission-ranges.ll
@@ -1,14 +1,39 @@
; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
-; RUN: llvm-dwarfdump -debug-dump=info.dwo %t | FileCheck %s
-; RUN: llvm-objdump -r %t | FileCheck --check-prefix=RELA %s
-
+; RUN: llvm-dwarfdump %t | FileCheck %s
+; RUN: llvm-objdump -h %t | FileCheck --check-prefix=HDR %s
+
+; CHECK: .debug_info.dwo contents:
+; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[A:0x[0-9a-z]*]])
+; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[E:0x[0-9a-z]*]])
+; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[B:0x[0-9a-z]*]])
+; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[D:0x[0-9a-z]*]])
; CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x000000a0)
+; CHECK: .debug_loc contents:
+; CHECK-NOT: Beginning address offset
+; CHECK: .debug_loc.dwo contents:
+
+; Don't assume these locations are entirely correct - feel free to update them
+; if they've changed due to a bugfix, change in register allocation, etc.
+
+; CHECK: [[A]]: Beginning address index: 2
+; CHECK-NEXT: Length: 199
+; CHECK-NEXT: Location description: 10 00
+; CHECK-NEXT: {{^$}}
+; CHECK-NEXT: Beginning address index: 3
+; CHECK-NEXT: Length: 23
+; CHECK-NEXT: Location description: 50 93 04
+; CHECK: [[E]]: Beginning address index: 4
+; CHECK-NEXT: Length: 21
+; CHECK-NEXT: Location description: 50 93 04
+; CHECK: [[B]]: Beginning address index: 5
+; CHECK-NEXT: Length: 19
+; CHECK-NEXT: Location description: 50 93 04
+; CHECK: [[D]]: Beginning address index: 6
+; CHECK-NEXT: Length: 23
+; CHECK-NEXT: Location description: 50 93 04
; Make sure we don't produce any relocations in any .dwo section (though in particular, debug_info.dwo)
-; FIXME: There should be no relocations in .dwo sections at all, but for now there are debug_loc relocs here.
-; RELA: RELOCATION RECORDS FOR [.rela.debug_info.dwo]
-; RELA-NOT: R_X86_64_32 .debug_ranges
-; RELA: RELOCATION RECORDS FOR
+; HDR-NOT: .rela.{{.*}}.dwo
; From the code: