• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
2RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
3RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE
4RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 %p/Inputs/basic-lto.macho.x86_64 %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LTO --check-prefix=CHECK-ARCHIVE
5
6This test check the basic Dwarf linking process through the debug dumps.
7
8================================= Simple link ================================
9CHECK: DEBUG MAP OBJECT: {{.*}}basic1.macho.x86_64.o
10CHECK: Input compilation unit:
11CHECK-NEXT: TAG_compile_unit
12CHECK-NOT: TAG
13CHECK: AT_name {{.*}}basic1.c
14CHECK-NOT: Found valid debug map entry
15CHECK: Found valid debug map entry: _main 	0000000000000000 => 0000000100000ea0
16CHECK-NEXT: DW_TAG_subprogram
17CHECK-NEXT:   DW_AT_name{{.*}}"main"
18
19CHECK: DEBUG MAP OBJECT: {{.*}}basic2.macho.x86_64.o
20CHECK: Input compilation unit:
21CHECK-NEXT: TAG_compile_unit
22CHECK-NOT: TAG
23CHECK: AT_name {{.*}}basic2.c
24CHECK-NOT: Found valid debug map entry
25CHECK: Found valid debug map entry: _private_int 	0000000000000560 => 0000000100001008
26CHECK-NEXT: DW_TAG_variable
27CHECK-NEXT:   DW_AT_name {{.*}}"private_int"
28CHECK-NOT: Found valid debug map entry
29CHECK: Found valid debug map entry: _baz 	0000000000000310 => 0000000100001000
30CHECK-NEXT: DW_TAG_variable
31CHECK-NEXT:   DW_AT_name {{.*}}"baz"
32CHECK-NOT: Found valid debug map entry
33CHECK: Found valid debug map entry: _foo 	0000000000000020 => 0000000100000ed0
34CHECK-NEXT: DW_TAG_subprogram
35CHECK-NEXT:   DW_AT_name {{.*}}"foo"
36CHECK-NOT: Found valid debug map entry
37CHECK: Found valid debug map entry: _inc 	0000000000000070 => 0000000100000f20
38CHECK-NEXT: DW_TAG_subprogram
39CHECK-NEXT:   DW_AT_name {{.*}}"inc"
40
41CHECK: DEBUG MAP OBJECT: {{.*}}basic3.macho.x86_64.o
42CHECK: Input compilation unit:
43CHECK-NEXT: TAG_compile_unit
44CHECK-NOT: TAG
45CHECK: AT_name {{.*}}basic3.c
46CHECK-NOT: Found valid debug map entry
47CHECK: Found valid debug map entry: _val 	ffffffffffffffff => 0000000100001004
48CHECK-NEXT: DW_TAG_variable
49CHECK-NEXT:   DW_AT_name {{.*}}"val"
50CHECK-NOT: Found valid debug map entry
51CHECK: Found valid debug map entry: _bar 	0000000000000020 => 0000000100000f40
52CHECK-NEXT: DW_TAG_subprogram
53CHECK-NEXT:   DW_AT_name {{.*}}"bar"
54CHECK-NOT: Found valid debug map entry
55CHECK: Found valid debug map entry: _inc 	0000000000000070 => 0000000100000f90
56CHECK-NEXT: DW_TAG_subprogram
57CHECK-NEXT:   DW_AT_name {{.*}}"inc")
58
59
60================================= LTO link ================================
61CHECK-LTO: DEBUG MAP OBJECT: {{.*}}basic-lto.macho.x86_64.o
62CHECK-LTO: Input compilation unit:
63CHECK-LTO-NEXT: TAG_compile_unit
64CHECK-LTO-NOT: TAG
65CHECK-LTO: AT_name {{.*}}basic1.c
66CHECK-LTO: Input compilation unit:
67CHECK-LTO-NEXT: TAG_compile_unit
68CHECK-LTO-NOT: TAG
69CHECK-LTO: AT_name {{.*}}basic2.c
70CHECK-LTO: Input compilation unit:
71CHECK-LTO-NEXT: TAG_compile_unit
72CHECK-LTO-NOT: TAG
73CHECK-LTO: AT_name {{.*}}basic3.c
74
75CHECK-LTO-NOT: Found valid debug map entry
76CHECK-LTO: Found valid debug map entry: _main 	0000000000000000 => 0000000100000f40
77CHECK-LTO-NEXT: DW_TAG_subprogram
78CHECK-LTO-NEXT:   DW_AT_name {{.*}}"main"
79CHECK-LTO-NOT: Found valid debug map entry
80CHECK-LTO: Found valid debug map entry: _private_int 	00000000000008e8 => 0000000100001008
81CHECK-LTO-NEXT: DW_TAG_variable
82CHECK-LTO-NEXT:   DW_AT_name {{.*}}"private_int"
83CHECK-LTO-NOT: Found valid debug map entry
84CHECK-LTO: Found valid debug map entry: _baz 	0000000000000658 => 0000000100001000
85CHECK-LTO-NEXT: DW_TAG_variable
86CHECK-LTO-NEXT:   DW_AT_name {{.*}} "baz"
87CHECK-LTO-NOT: Found valid debug map entry
88CHECK-LTO: Found valid debug map entry: _foo 	0000000000000010 => 0000000100000f50
89CHECK-LTO-NEXT: DW_TAG_subprogram
90CHECK-LTO-NEXT:   DW_AT_name {{.*}}"foo"
91CHECK-LTO-NOT: Found valid debug map entry
92CHECK-LTO: Found valid debug map entry: _val 	00000000000008ec => 0000000100001004
93CHECK-LTO-NEXT: DW_TAG_variable
94CHECK-LTO-NEXT:   DW_AT_name {{.*}}"val"
95CHECK-LTO-NOT: Found valid debug map entry
96CHECK-LTO: Found valid debug map entry: _bar 	0000000000000050 => 0000000100000f90
97CHECK-LTO-NEXT: DW_TAG_subprogram
98CHECK-LTO-NEXT:   DW_AT_name {{.*}}"bar"
99
100
101================================= Archive link ================================
102CHECK-ARCHIVE: DEBUG MAP OBJECT: {{.*}}basic1.macho.x86_64.o
103CHECK-ARCHIVE: Input compilation unit:
104CHECK-ARCHIVE-NEXT: TAG_compile_unit
105CHECK-ARCHIVE-NOT: TAG
106CHECK-ARCHIVE: AT_name {{.*}}basic1.c
107CHECK-ARCHIVE-NOT: Found valid debug map entry
108CHECK-ARCHIVE: Found valid debug map entry: _main 	0000000000000000 => 0000000100000ea0
109CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
110CHECK-ARCHIVE-NEXT:   DW_AT_name{{.*}}"main"
111
112CHECK-ARCHIVE: DEBUG MAP OBJECT: {{.*}}libbasic.a(basic2.macho.x86_64.o)
113CHECK-ARCHIVE: Input compilation unit:
114CHECK-ARCHIVE-NEXT: TAG_compile_unit
115CHECK-ARCHIVE-NOT: TAG
116CHECK-ARCHIVE: AT_name {{.*}}basic2.c
117CHECK-ARCHIVE-NOT: Found valid debug map entry
118CHECK-ARCHIVE: Found valid debug map entry: _private_int 	0000000000000560 => 0000000100001004
119CHECK-ARCHIVE-NEXT: DW_TAG_variable
120CHECK-ARCHIVE-NEXT:   DW_AT_name {{.*}}"private_int"
121CHECK-ARCHIVE-NOT: Found valid debug map entry
122CHECK-ARCHIVE: Found valid debug map entry: _baz 	0000000000000310 => 0000000100001000
123CHECK-ARCHIVE-NEXT: DW_TAG_variable
124CHECK-ARCHIVE-NEXT:   DW_AT_name {{.*}}"baz"
125CHECK-ARCHIVE-NOT: Found valid debug map entry
126CHECK-ARCHIVE: Found valid debug map entry: _foo 	0000000000000020 => 0000000100000ed0
127CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
128CHECK-ARCHIVE-NEXT:   DW_AT_name {{.*}}"foo"
129CHECK-ARCHIVE-NOT: Found valid debug map entry
130CHECK-ARCHIVE: Found valid debug map entry: _inc 	0000000000000070 => 0000000100000f20
131CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
132CHECK-ARCHIVE-NEXT:   DW_AT_name {{.*}}"inc"
133
134CHECK-ARCHIVE: DEBUG MAP OBJECT: {{.*}}libbasic.a(basic3.macho.x86_64.o)
135CHECK-ARCHIVE: Input compilation unit:
136CHECK-ARCHIVE-NEXT: TAG_compile_unit
137CHECK-ARCHIVE-NOT: TAG
138CHECK-ARCHIVE: AT_name {{.*}}basic3.c
139CHECK-ARCHIVE-NOT: Found valid debug map entry
140CHECK-ARCHIVE: Found valid debug map entry: _val 	ffffffffffffffff => 0000000100001008
141CHECK-ARCHIVE-NEXT: DW_TAG_variable
142CHECK-ARCHIVE-NEXT:   DW_AT_name {{.*}}"val"
143CHECK-ARCHIVE-NOT: Found valid debug map entry
144CHECK-ARCHIVE: Found valid debug map entry: _bar 	0000000000000020 => 0000000100000f40
145CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
146CHECK-ARCHIVE-NEXT:   DW_AT_name {{.*}}"bar"
147CHECK-ARCHIVE-NOT: Found valid debug map entry
148CHECK-ARCHIVE: Found valid debug map entry: _inc 	0000000000000070 => 0000000100000f90
149CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
150CHECK-ARCHIVE-NEXT:   DW_AT_name {{.*}}"inc")
151