blob: 754450f13f3fb3ba36bb5db09904555aeec17a69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
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"
CHECK-NOT: "clang version
CHECK: 0x[[BCPP:.*]]: "b.cpp"
CHECK: .debug_str_offsets.dwo contents:
CHECK: : 00000000
CHECK: : [[ACPP]]
CHECK: : 00000000
CHECK: : [[BCPP]]
|