summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-dwp/X86/simple.test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-dwp/X86/simple.test')
-rw-r--r--llvm/test/tools/llvm-dwp/X86/simple.test58
1 files changed, 58 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-dwp/X86/simple.test b/llvm/test/tools/llvm-dwp/X86/simple.test
new file mode 100644
index 00000000000..26215bdc8c9
--- /dev/null
+++ b/llvm/test/tools/llvm-dwp/X86/simple.test
@@ -0,0 +1,58 @@
+RUN: llvm-dwp %p/../Inputs/simple/a.dwo %p/../Inputs/simple/b.dwo -o %t
+RUN: llvm-dwarfdump %t | FileCheck %s
+
+FIXME: For some reason, piping straight from llvm-dwp to llvm-dwarfdump doesn't behave well - looks like dwarfdump is reading/closes before dwp has finished.
+
+DWP from non-type-unit debug info for these two translation units:
+a.cpp:
+ struct foo { };
+ foo a;
+
+b.cpp:
+ struct bar { };
+ void b(bar) {
+ }
+
+CHECK: .debug_abbrev.dwo contents:
+CHECK: Abbrev table for offset: 0x00000000
+CHECK: DW_TAG_compile_unit
+CHECK: DW_TAG_variable
+CHECK: DW_TAG_structure_type
+CHECK: Abbrev table for offset: 0x00000031
+CHECK: DW_TAG_compile_unit
+CHECK: DW_TAG_structure_type
+CHECK: DW_TAG_subprogram
+CHECK: DW_TAG_formal_parameter
+
+CHECK: .debug_info.dwo contents:
+CHECK: 0x00000000: Compile Unit: length = 0x00000025 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000029)
+CHECK: DW_TAG_compile_unit
+CHECK: DW_AT_name {{.*}} "a.cpp"
+CHECK: DW_TAG_variable
+CHECK: DW_AT_name {{.*}} "a"
+CHECK: DW_TAG_structure_type
+CHECK: DW_AT_name {{.*}} "foo"
+
+FIXME: Using cu_index, identify that abbr_offset is 0x0031, not 0x0000
+CHECK: 0x00000029: Compile Unit: length = 0x00000031 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000005e)
+FIXME: Using cu_index, use strings based on the right str index offset
+CHECK: DW_AT_name {{.*}} "a.cpp"
+FIXME: Using cu_index to find the right abbrevs at abbr_offset, this abbrevation should actually be structure_type
+CHECK: DW_TAG_variable
+
+CHECK: .debug_cu_index contents:
+FIXME: Emit and verify the cu_index contents
+
+CHECK: .debug_str.dwo contents:
+CHECK: "clang version
+CHECK: 0x[[ACPP:.*]]: "a.cpp"
+FIXME: Remove duplicates
+CHECK: "clang version
+CHECK: 0x[[BCPP:.*]]: "b.cpp"
+
+CHECK: .debug_str_offsets.dwo contents:
+CHECK: : 00000000
+CHECK: : [[ACPP]]
+CHECK: : 00000000
+FIXME: Update str offset indexes, this should be BCPP \/
+CHECK: : [[ACPP]]
OpenPOWER on IntegriCloud