1 # This test verifies that: if a DW_TAG_compile_unit has children not having
2 # ranges then llvm-dwarfdump still correctly verifies other dies with normal
5 # The DWARF looks like:
6 # 0x0000000b: DW_TAG_compile_unit
7 # DW_AT_name ("/tmp/main.c")
8 # DW_AT_language (DW_LANG_C)
9 # DW_AT_low_pc (0x0000000000000000)
10 # DW_AT_ranges (0x00000000
11 # [0x0000000000002000, 0x0000000000003000)
12 # [0x0000000000001000, 0x0000000000002000))
14 # 0x0000001e: DW_TAG_subprogram
15 # DW_AT_name ("no_range1")
17 # 0x00000044: DW_TAG_subprogram
19 # DW_AT_low_pc (0x0000000000001000)
20 # DW_AT_high_pc (0x0000000000002000)
22 # 0x00000055: DW_TAG_subprogram
24 # DW_AT_low_pc (0x0000000000002000)
25 # DW_AT_high_pc (0x0000000000003000)
27 # # 0x0000001e: DW_TAG_subprogram
28 # DW_AT_name ("no_range2")
32 # RUN: yaml2obj %s | llvm-dwarfdump --verify - | FileCheck %s
34 # CHECK: Verifying -: file format Mach-O 64-bit x86-64
35 # CHECK: Verifying .debug_abbrev...
36 # CHECK: Verifying .debug_info Unit Header Chain...
43 cpusubtype: 0x00000003
62 - sectname: __debug_abbrev
64 addr: 0x0000000000000000
74 - sectname: __debug_info
76 addr: 0x0000000000000024
86 - sectname: __debug_ranges
88 addr: 0x000000000000008B
98 - sectname: __debug_str
100 addr: 0x00000000000000DB
107 reserved1: 0x00000000
108 reserved2: 0x00000000
109 reserved3: 0x00000000
116 - cmd: LC_BUILD_VERSION
125 - cmd: LC_DATA_IN_CODE
149 Tag: DW_TAG_compile_unit
150 Children: DW_CHILDREN_yes
152 - Attribute: DW_AT_name
154 - Attribute: DW_AT_language
156 - Attribute: DW_AT_low_pc
158 - Attribute: DW_AT_ranges
159 Form: DW_FORM_sec_offset
161 Tag: DW_TAG_subprogram
162 Children: DW_CHILDREN_no
164 - Attribute: DW_AT_name
166 - Attribute: DW_AT_low_pc
168 - Attribute: DW_AT_high_pc
171 Tag: DW_TAG_subprogram
172 Children: DW_CHILDREN_no
174 - Attribute: DW_AT_name
181 - LowOffset: 0x0000000000002000
182 HighOffset: 0x0000000000003000
183 - LowOffset: 0x0000000000001000
184 HighOffset: 0x0000000000002000
189 - AbbrCode: 0x00000001
191 - Value: 0x0000000000000001
192 - Value: 0x0000000000000002
193 - Value: 0x0000000000000000
194 - Value: 0x0000000000000000
195 - AbbrCode: 0x00000003
197 - Value: 0x000000000000000D
198 - AbbrCode: 0x00000002
200 - Value: 0x0000000000000021
201 - Value: 0x0000000000001000
202 - Value: 0x0000000000001000
203 - AbbrCode: 0x00000002
205 - Value: 0x0000000000000026
206 - Value: 0x0000000000002000
207 - Value: 0x0000000000001000
208 - AbbrCode: 0x00000003
210 - Value: 0x0000000000000017
211 - AbbrCode: 0x00000000