summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Pieb <Wolfgang.Pieb@sony.com>2017-06-13 00:42:03 +0000
committerWolfgang Pieb <Wolfgang.Pieb@sony.com>2017-06-13 00:42:03 +0000
commit0bb38885e56305d9082eb66d8be66100a2bdd45a (patch)
treed50c53fb8eaa301ccb026b6e4b79cd00b98ebba5
parentfa18b2f68c32a4b10f564c515e6e564029a602be (diff)
downloadbcm5719-llvm-0bb38885e56305d9082eb66d8be66100a2bdd45a.tar.gz
bcm5719-llvm-0bb38885e56305d9082eb66d8be66100a2bdd45a.zip
Adding one test that I forgot to include with the commit for https://reviews.llvm.org/D32779.
NFC llvm-svn: 305261
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-str-offsets-dwp.x86_64.obin0 -> 3328 bytes
-rw-r--r--llvm/test/DebugInfo/dwarfdump-str-offsets-dwp.test56
2 files changed, 56 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-str-offsets-dwp.x86_64.o b/llvm/test/DebugInfo/Inputs/dwarfdump-str-offsets-dwp.x86_64.o
new file mode 100644
index 00000000000..b3c73f72d24
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-str-offsets-dwp.x86_64.o
Binary files differ
diff --git a/llvm/test/DebugInfo/dwarfdump-str-offsets-dwp.test b/llvm/test/DebugInfo/dwarfdump-str-offsets-dwp.test
new file mode 100644
index 00000000000..ceca3225f07
--- /dev/null
+++ b/llvm/test/DebugInfo/dwarfdump-str-offsets-dwp.test
@@ -0,0 +1,56 @@
+RUN: llvm-dwarfdump %p/Inputs/dwarfdump-str-offsets-dwp.x86_64.o | FileCheck %s
+
+; Verify that the correct strings from each unit are displayed and that the
+; index for the .debug_str_offsets section has the right values.
+
+; CHECK: Compile Unit
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_compile_unit
+; CHECK-NEXT: DW_AT_producer [DW_FORM_strx] ( indexed (00000000) string = "Handmade DWARF producer")
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000001) string = "Compile_Unit_1")
+; CHECK-NEXT: DW_AT_str_offsets_base [DW_FORM_sec_offset] (0x00000008)
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000002) string = "/home/test/CU1")
+; CHECK-NOT: NULL
+
+; CHECK: Compile Unit
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_compile_unit
+; CHECK-NEXT: DW_AT_producer [DW_FORM_strx] ( indexed (00000000) string = "Handmade DWARF producer")
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000001) string = "Compile_Unit_2")
+; CHECK-NEXT: DW_AT_str_offsets_base [DW_FORM_sec_offset] (0x00000008)
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000002) string = "/home/test/CU2")
+;
+; CHECK: Type Unit
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_type_unit
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000000) string = "Type_Unit_1")
+; CHECK-NEXT: DW_AT_str_offsets_base [DW_FORM_sec_offset] (0x0000001c)
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_structure_type
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000001) string = "MyStruct_1")
+;
+; CHECK: Type Unit
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_type_unit
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000000) string = "Type_Unit_2")
+; CHECK-NEXT: DW_AT_str_offsets_base [DW_FORM_sec_offset] (0x0000001c)
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_structure_type
+; CHECK-NEXT: DW_AT_name [DW_FORM_strx] ( indexed (00000001) string = "MyStruct_2")
+
+; Verify the correct offets of the compile and type units contributions in the
+; index tables.
+
+; CHECK: .debug_cu_index contents:
+; CHECK-NOT: contents:
+; CHECK: 1 0xddeeaaddbbaabbee [{{0x[0-9a-f]*, 0x[0-9a-f]*}}) [{{0x[0-9a-f]*, 0x[0-9a-f]*}})
+; CHECK-SAME: [0x00000000
+; CHECK-NEXT: 2 0xff00ffeeffaaff00 [{{0x[0-9a-f]*, 0x[0-9a-f]*}}) [{{0x[0-9a-f]*, 0x[0-9a-f]*}})
+; CHECK-SAME: [0x00000024
+
+; CHECK: .debug_tu_index contents:
+; CHECK-NOT: contents:
+; CHECK: 1 0xeeaaddbbaabbeedd [{{0x[0-9a-f]*, 0x[0-9a-f]*}}) [{{0x[0-9a-f]*, 0x[0-9a-f]*}})
+; CHECK-SAME: [0x00000000
+; CHECK-NEXT: 2 0x00ffeeffaaff00ff [{{0x[0-9a-f]*, 0x[0-9a-f]*}}) [{{0x[0-9a-f]*, 0x[0-9a-f]*}})
+; CHECK: [0x00000024
OpenPOWER on IntegriCloud