diff options
Diffstat (limited to 'llvm/test/tools')
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/simple/a.cpp | 2 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/simple/a.dwo | bin | 0 -> 1193 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/simple/b.cpp | 3 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/simple/b.dwo | bin | 0 -> 1241 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/X86/lit.local.cfg | 4 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/X86/simple.test | 58 |
6 files changed, 67 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-dwp/Inputs/simple/a.cpp b/llvm/test/tools/llvm-dwp/Inputs/simple/a.cpp new file mode 100644 index 00000000000..f85d105a99f --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/simple/a.cpp @@ -0,0 +1,2 @@ +struct foo { }; +foo a; diff --git a/llvm/test/tools/llvm-dwp/Inputs/simple/a.dwo b/llvm/test/tools/llvm-dwp/Inputs/simple/a.dwo Binary files differnew file mode 100644 index 00000000000..7bdb2a7b9f8 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/simple/a.dwo diff --git a/llvm/test/tools/llvm-dwp/Inputs/simple/b.cpp b/llvm/test/tools/llvm-dwp/Inputs/simple/b.cpp new file mode 100644 index 00000000000..fedcc160f41 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/simple/b.cpp @@ -0,0 +1,3 @@ +struct bar { }; +void b(bar) { +} diff --git a/llvm/test/tools/llvm-dwp/Inputs/simple/b.dwo b/llvm/test/tools/llvm-dwp/Inputs/simple/b.dwo Binary files differnew file mode 100644 index 00000000000..f41243dc722 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/simple/b.dwo diff --git a/llvm/test/tools/llvm-dwp/X86/lit.local.cfg b/llvm/test/tools/llvm-dwp/X86/lit.local.cfg new file mode 100644 index 00000000000..05f8b38b334 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/X86/lit.local.cfg @@ -0,0 +1,4 @@ +if not 'X86' in config.root.targets: + config.unsupported = True + +config.suffixes = ['.test', '.cpp', '.m', '.s'] 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]] |

