1 ## This test checks handling of DWARFv5 address attribute.
2 ## It contains two compile units. One is a good one and
3 ## should be processed correctly. Second is a bad - it
4 ## missing DW_AT_addr_base attribute. All address attributes
5 ## inside this unit should be skipped.
7 # RUN: yaml2obj %s -o %t.o
8 # RUN: echo '---' > %t2.map
9 # RUN: echo "triple: 'x86_64-apple-darwin'" >> %t2.map
10 # RUN: echo 'objects:' >> %t2.map
11 # RUN: echo " - filename: '%t.o'" >> %t2.map
12 # RUN: echo ' symbols:' >> %t2.map
13 # RUN: echo ' - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map
14 # RUN: echo '...' >> %t2.map
15 # RUN: dsymutil -y %t2.map -f -o - | llvm-dwarfdump -a - | FileCheck %s
17 # CHECK: file format Mach-O 64-bit x86-64
18 # CHECK: .debug_info contents:
19 # CHECK: Compile Unit:
20 # CHECK: DW_TAG_compile_unit
21 # CHECK: DW_AT_name{{.*}}"GoodCU"
23 # CHECK: DW_TAG_subprogram
24 # CHECK: DW_AT_name{{.*}}"foo"
25 # CHECK: DW_TAG_variable
26 # CHECK: DW_AT_name{{.*}}"var1"
27 # CHECK: DW_AT_location (DW_OP_addr
28 # CHECK: 0x00000043: NULL
29 # CHECK: Compile Unit:
30 # CHECK: DW_TAG_compile_unit
31 # CHECK-NOT: DW_AT_low_pc
32 # CHECK: DW_AT_name{{.*}}"BadCU"
33 # CHECK-NOT: DW_TAG_subprogram
34 # CHECK-NOT: DW_TAG_variable
35 # CHECK: 0x0000005b: NULL
41 cpusubtype: 0x00000003
60 - sectname: __debug_abbrev
62 addr: 0x000000000000000F
72 - sectname: __debug_info
74 addr: 0x000000000000100
84 - sectname: __debug_addr
86 addr: 0x0000000000000200
138 - Tag: DW_TAG_compile_unit
139 Children: DW_CHILDREN_yes
141 - Attribute: DW_AT_producer
143 - Attribute: DW_AT_language
145 - Attribute: DW_AT_name
147 - Attribute: DW_AT_low_pc
149 - Attribute: DW_AT_high_pc
151 - Attribute: DW_AT_addr_base
152 Form: DW_FORM_sec_offset
153 - Tag: DW_TAG_subprogram
154 Children: DW_CHILDREN_yes
156 - Attribute: DW_AT_name
158 - Attribute: DW_AT_low_pc
160 - Attribute: DW_AT_high_pc
162 - Attribute: DW_AT_type
164 - Tag: DW_TAG_base_type
165 Children: DW_CHILDREN_no
167 - Attribute: DW_AT_name
169 - Tag: DW_TAG_variable
170 Children: DW_CHILDREN_no
172 - Attribute: DW_AT_name
174 - Attribute: DW_AT_type
176 - Attribute: DW_AT_location
177 Form: DW_FORM_exprloc
179 - Tag: DW_TAG_compile_unit
180 Children: DW_CHILDREN_yes
182 - Attribute: DW_AT_producer
184 - Attribute: DW_AT_language
186 - Attribute: DW_AT_name
188 - Attribute: DW_AT_low_pc
190 - Attribute: DW_AT_high_pc
192 - Tag: DW_TAG_subprogram
193 Children: DW_CHILDREN_yes
195 - Attribute: DW_AT_name
197 - Attribute: DW_AT_low_pc
199 - Attribute: DW_AT_high_pc
201 - Attribute: DW_AT_type
203 - Tag: DW_TAG_base_type
204 Children: DW_CHILDREN_no
206 - Attribute: DW_AT_name
208 - Tag: DW_TAG_variable
209 Children: DW_CHILDREN_no
211 - Attribute: DW_AT_name
213 - Attribute: DW_AT_type
215 - Attribute: DW_AT_location
216 Form: DW_FORM_exprloc
219 UnitType: DW_UT_compile
248 UnitType: DW_UT_compile