Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-dwarfdump / X86 / verify_cu_ranges.yaml
blob1ace2d4159d1fb14838218519215a3a9b42ef3c4
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
3 # ranges.
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
18 #                 DW_AT_name    ("main")
19 #                 DW_AT_low_pc  (0x0000000000001000)
20 #                 DW_AT_high_pc (0x0000000000002000)
22 # 0x00000055:   DW_TAG_subprogram
23 #                 DW_AT_name    ("foo")
24 #                 DW_AT_low_pc  (0x0000000000002000)
25 #                 DW_AT_high_pc (0x0000000000003000)
27 # # 0x0000001e:   DW_TAG_subprogram
28 #                 DW_AT_name    ("no_range2")
30 # 0x00000066:   NULL
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...
37 # CHECK: No errors.
39 --- !mach-o
40 FileHeader:
41   magic:           0xFEEDFACF
42   cputype:         0x01000007
43   cpusubtype:      0x00000003
44   filetype:        0x00000001
45   ncmds:           4
46   sizeofcmds:      464
47   flags:           0x00002000
48   reserved:        0x00000000
49 LoadCommands:
50   - cmd:             LC_SEGMENT_64
51     cmdsize:         392
52     segname:         ''
53     vmaddr:          0
54     vmsize:          261
55     fileoff:         528
56     filesize:        261
57     maxprot:         7
58     initprot:        7
59     nsects:          4
60     flags:           0
61     Sections:
62       - sectname:        __debug_abbrev
63         segname:         __DWARF
64         addr:            0x0000000000000000
65         size:            36
66         offset:          0x00000210
67         align:           0
68         reloff:          0x00000000
69         nreloc:          0
70         flags:           0x00000000
71         reserved1:       0x00000000
72         reserved2:       0x00000000
73         reserved3:       0x00000000
74       - sectname:        __debug_info
75         segname:         __DWARF
76         addr:            0x0000000000000024
77         size:            75
78         offset:          0x00000234
79         align:           0
80         reloff:          0x00000000
81         nreloc:          0
82         flags:           0x00000000
83         reserved1:       0x00000000
84         reserved2:       0x00000000
85         reserved3:       0x00000000
86       - sectname:        __debug_ranges
87         segname:         __DWARF
88         addr:            0x000000000000008B
89         size:            48
90         offset:          0x0000029B
91         align:           0
92         reloff:          0x00000000
93         nreloc:          0
94         flags:           0x00000000
95         reserved1:       0x00000000
96         reserved2:       0x00000000
97         reserved3:       0x00000000
98       - sectname:        __debug_str
99         segname:         __DWARF
100         addr:            0x00000000000000DB
101         size:            42
102         offset:          0x000002EB
103         align:           0
104         reloff:          0x00000000
105         nreloc:          0
106         flags:           0x00000000
107         reserved1:       0x00000000
108         reserved2:       0x00000000
109         reserved3:       0x00000000
110   - cmd:             LC_SYMTAB
111     cmdsize:         24
112     symoff:          0
113     nsyms:           0
114     stroff:          792
115     strsize:         8
116   - cmd:             LC_BUILD_VERSION
117     cmdsize:         32
118     platform:        1
119     minos:           658944
120     sdk:             658944
121     ntools:          1
122     Tools:
123       - tool:            3
124         version:         34734080
125   - cmd:             LC_DATA_IN_CODE
126     cmdsize:         16
127     dataoff:         792
128     datasize:        0
129 LinkEditData:
130   StringTable:
131     - ' '
132     - ''
133     - ''
134     - ''
135     - ''
136     - ''
137     - ''
138 DWARF:
139   debug_str:
140     - ''
141     - '/tmp/main.c'
142     - no_range1
143     - no_range2
144     - main
145     - foo
146   debug_abbrev:
147     - Table:
148         - Code:            0x00000001
149           Tag:             DW_TAG_compile_unit
150           Children:        DW_CHILDREN_yes
151           Attributes:
152             - Attribute:       DW_AT_name
153               Form:            DW_FORM_strp
154             - Attribute:       DW_AT_language
155               Form:            DW_FORM_data2
156             - Attribute:       DW_AT_low_pc
157               Form:            DW_FORM_addr
158             - Attribute:       DW_AT_ranges
159               Form:            DW_FORM_sec_offset
160         - Code:            0x00000002
161           Tag:             DW_TAG_subprogram
162           Children:        DW_CHILDREN_no
163           Attributes:
164             - Attribute:       DW_AT_name
165               Form:            DW_FORM_strp
166             - Attribute:       DW_AT_low_pc
167               Form:            DW_FORM_addr
168             - Attribute:       DW_AT_high_pc
169               Form:            DW_FORM_data4
170         - Code:            0x00000003
171           Tag:             DW_TAG_subprogram
172           Children:        DW_CHILDREN_no
173           Attributes:
174             - Attribute:       DW_AT_name
175               Form:            DW_FORM_strp
177   debug_ranges:
178     - Offset:          0x00000000
179       AddrSize:        0x08
180       Entries:
181         - LowOffset:       0x0000000000002000
182           HighOffset:      0x0000000000003000
183         - LowOffset:       0x0000000000001000
184           HighOffset:      0x0000000000002000
185   debug_info:
186     - Version:         4
187       AddrSize:        8
188       Entries:
189         - AbbrCode:        0x00000001
190           Values:
191             - Value:           0x0000000000000001
192             - Value:           0x0000000000000002
193             - Value:           0x0000000000000000
194             - Value:           0x0000000000000000
195         - AbbrCode:        0x00000003
196           Values:
197             - Value:           0x000000000000000D
198         - AbbrCode:        0x00000002
199           Values:
200             - Value:           0x0000000000000021
201             - Value:           0x0000000000001000
202             - Value:           0x0000000000001000
203         - AbbrCode:        0x00000002
204           Values:
205             - Value:           0x0000000000000026
206             - Value:           0x0000000000002000
207             - Value:           0x0000000000001000
208         - AbbrCode:        0x00000003
209           Values:
210             - Value:           0x0000000000000017
211         - AbbrCode:        0x00000000