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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
| RUN: rm -rf %t
RUN: mkdir %t
RUN: cd %t
RUN: cp %p/../Inputs/dwos_list_from_exec/a.dwo a.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/b.dwo b.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/c.dwo c.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/d.dwo d.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/e.dwo e.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/main main
RUN: cp %p/../Inputs/dwos_list_from_exec/libd.so libd.so
RUN: llvm-dwp c.dwo e.dwo -e main -e libd.so -o - | llvm-dwarfdump -v - | FileCheck %s
Build commands for the test binaries:
clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf a.cpp b.cpp -o main
clang++ -g -O0 -gsplit-dwarf -c c.cpp -o c.o
clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf -fPIC -shared d.cpp -o libd.so
clang++ -g -O0 -gsplit-dwarf -c e.cpp -o e.o
sources:
a.cpp:
void a() {}
b.cpp:
void b() {}
int main() {
return 0;
}
c.cpp:
void c() {}
d.cpp:
void d() {}
e.cpp:
void e() {}
CHECK-LABEL: .debug_abbrev.dwo contents:
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK: .debug_info.dwo contents:
CHECK: [[AOFF:0x[0-9a-f]*]]:
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "c.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "c"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "e.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "e"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "a.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "a"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "b.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "b"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "main"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "d.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "d"
|