aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-11-01 17:53:30 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-11-01 17:53:30 +0000
commit2e110c3fa62bce0182c1635964f5e09e34e3cbb5 (patch)
tree5c87038de5083a5105934556656693bf35761326 /test
parent26cc826a0e4693b861776d6b349d41d0e5c2678e (diff)
downloadexternal_llvm-2e110c3fa62bce0182c1635964f5e09e34e3cbb5.zip
external_llvm-2e110c3fa62bce0182c1635964f5e09e34e3cbb5.tar.gz
external_llvm-2e110c3fa62bce0182c1635964f5e09e34e3cbb5.tar.bz2
DebugInfo: Make pubnames header printing similar to unit header printing
In a failed attempt to allow the gnu-public-names.ll test case to not hardcode the size of the unit that the pubnames section referred to I've at least managed to have unit headers and pubnames headers print out in a similar style. This failed to achieve the desired goal because the header in a unit specifies the length of the unit without the length element of the header whereas the length in the pubnames includes this element, so the numbers are off by 4 bytes. I don't know of any arithmetic powers in FileCheck so the test case can't simply say "CU_LENGTH + 4". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/DebugInfo/X86/gnu-public-names.ll11
-rw-r--r--test/DebugInfo/dwarf-public-names.ll2
-rw-r--r--test/DebugInfo/dwarfdump-pubnames.test5
3 files changed, 4 insertions, 14 deletions
diff --git a/test/DebugInfo/X86/gnu-public-names.ll b/test/DebugInfo/X86/gnu-public-names.ll
index 2a6d997..a9fc0ed 100644
--- a/test/DebugInfo/X86/gnu-public-names.ll
+++ b/test/DebugInfo/X86/gnu-public-names.ll
@@ -104,10 +104,7 @@
; CHECK-NEXT: DW_AT_name {{.*}} "global_function"
; CHECK-LABEL: .debug_gnu_pubnames contents:
-; CHECK-NEXT: Length: 231
-; CHECK-NEXT: Version: 2
-; CHECK-NEXT: Offset in .debug_info: 0
-; CHECK-NEXT: Size: 379
+; CHECK-NEXT: length = 0x000000e7 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x0000017b
; CHECK-NEXT: Offset Linkage Kind Name
; CHECK-DAG: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function"
; CHECK-DAG: [[NS]] EXTERNAL TYPE "ns"
@@ -121,11 +118,7 @@
; CHECK-LABEL: debug_gnu_pubtypes contents:
-; CHECK-NEXT: Length:
-; CHECK-NEXT: Version:
-; CHECK-NEXT: Offset in .debug_info:
-; CHECK-NEXT: Size:
-; CHECK-NEXT: Offset Linkage Kind Name
+; CHECK: Offset Linkage Kind Name
; CHECK-DAG: [[C]] EXTERNAL TYPE "C"
; CHECK-DAG: [[D]] EXTERNAL TYPE "ns::D"
; CHECK-DAG: [[INT]] STATIC TYPE "int"
diff --git a/test/DebugInfo/dwarf-public-names.ll b/test/DebugInfo/dwarf-public-names.ll
index ee9cbd5..b5609ea 100644
--- a/test/DebugInfo/dwarf-public-names.ll
+++ b/test/DebugInfo/dwarf-public-names.ll
@@ -37,7 +37,7 @@
; Skip the output to the header of the pubnames section.
; CHECK: debug_pubnames
-; CHECK: Version: 2
+; CHECK: version = 0x0002
; Check for each name in the output.
; CHECK: global_namespace_variable
diff --git a/test/DebugInfo/dwarfdump-pubnames.test b/test/DebugInfo/dwarfdump-pubnames.test
index 1520036..215953a 100644
--- a/test/DebugInfo/dwarfdump-pubnames.test
+++ b/test/DebugInfo/dwarfdump-pubnames.test
@@ -2,10 +2,7 @@ RUN: llvm-dwarfdump %p/Inputs/dwarfdump-pubnames.elf-x86-64 \
RUN: -debug-dump=pubnames | FileCheck %s
CHECK: .debug_pubnames contents:
-CHECK: Length: 161
-CHECK: Version: 2
-CHECK: Offset in .debug_info: 0
-CHECK: Size: 321
+CHECK: length = 0x000000a1 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000141
CHECK: Offset Name
CHECK: 0x00000098 "global_namespace_variable"