Debian Codegraph @

llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf4-macro-vendor-specific.test

raw
1 ## This test checks DWARFv4 DW_MACINFO_vendor_ext attribute.
2
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: llvm-dwarfutil %t.o %t1
5 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
6
7 ## Content: "030002FF0656000400":
8 #
9 ## .byte 3 # DW_MACINFO_start_file
10 ## .byte 0 # Line Number
11 ## .byte 2 # File Number
12 ## .byte ff # DW_MACINFO_vendor_ext
13 ## .byte 6 # Line Number
14 ## .asciz "V" # Macro String
15 ## .byte 4 # DW_MACINFO_end_file
16 ## .byte 0 # End Of Macro List Mark
17
18 #CHECK: .debug_info contents:
19 #CHECK: DW_TAG_compile_unit
20 #CHECK: DW_AT_name ("CU1")
21 #CHECK: DW_AT_macro_info (0x00000000)
22 #CHECK: .debug_macinfo contents:
23 #CHECK: 0x00000000:
24 #CHECK: DW_MACINFO_start_file - lineno: 0 filenum: 2
25 #CHECK: DW_MACINFO_invalid
26
27 --- !ELF
28 FileHeader:
29 Class: ELFCLASS64
30 Data: ELFDATA2LSB
31 Type: ET_REL
32 Machine: EM_X86_64
33 Sections:
34 - Name: .text
35 Type: SHT_PROGBITS
36 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
37 Address: 0x1000
38 Size: 0x1b
39 - Name: .debug_macinfo
40 Type: SHT_PROGBITS
41 Flags: [ ]
42 Content: "030002FF0656000400"
43 DWARF:
44 debug_abbrev:
45 - Table:
46 - Tag: DW_TAG_compile_unit
47 Children: DW_CHILDREN_yes
48 Attributes:
49 - Attribute: DW_AT_producer
50 Form: DW_FORM_string
51 - Attribute: DW_AT_language
52 Form: DW_FORM_data2
53 - Attribute: DW_AT_name
54 Form: DW_FORM_string
55 - Attribute: DW_AT_low_pc
56 Form: DW_FORM_addr
57 - Attribute: DW_AT_high_pc
58 Form: DW_FORM_data8
59 - Attribute: DW_AT_macro_info
60 Form: DW_FORM_sec_offset
61 - Tag: DW_TAG_class_type
62 Children: DW_CHILDREN_yes
63 Attributes:
64 - Attribute: DW_AT_name
65 Form: DW_FORM_string
66 - Tag: DW_TAG_member
67 Children: DW_CHILDREN_no
68 Attributes:
69 - Attribute: DW_AT_type
70 Form: DW_FORM_ref4
71 - Attribute: DW_AT_name
72 Form: DW_FORM_string
73 - Tag: DW_TAG_class_type
74 Children: DW_CHILDREN_no
75 Attributes:
76 - Attribute: DW_AT_name
77 Form: DW_FORM_string
78 - Attribute: DW_AT_declaration
79 Form: DW_FORM_flag_present
80 - Tag: DW_TAG_class_type
81 Children: DW_CHILDREN_yes
82 Attributes:
83 - Attribute: DW_AT_name
84 Form: DW_FORM_string
85 - Attribute: DW_AT_declaration
86 Form: DW_FORM_flag_present
87 - Tag: DW_TAG_template_type_parameter
88 Children: DW_CHILDREN_no
89 Attributes:
90 - Attribute: DW_AT_type
91 Form: DW_FORM_ref4
92 - Tag: DW_TAG_base_type
93 Children: DW_CHILDREN_no
94 Attributes:
95 - Attribute: DW_AT_name
96 Form: DW_FORM_string
97 - Tag: DW_TAG_pointer_type
98 Children: DW_CHILDREN_no
99 Attributes:
100 - Attribute: DW_AT_type
101 Form: DW_FORM_ref4
102 - Tag: DW_TAG_variable
103 Children: DW_CHILDREN_no
104 Attributes:
105 - Attribute: DW_AT_name
106 Form: DW_FORM_string
107 - Attribute: DW_AT_const_value
108 Form: DW_FORM_data4
109 - Attribute: DW_AT_type
110 Form: DW_FORM_ref4
111 - Tag: DW_TAG_subprogram
112 Children: DW_CHILDREN_no
113 Attributes:
114 - Attribute: DW_AT_name
115 Form: DW_FORM_string
116 - Attribute: DW_AT_low_pc
117 Form: DW_FORM_addr
118 - Attribute: DW_AT_high_pc
119 Form: DW_FORM_data8
120 - Attribute: DW_AT_type
121 Form: DW_FORM_ref4
122 debug_info:
123 - Version: 4
124 Entries:
125 - AbbrCode: 1
126 Values:
127 - CStr: by_hand
128 - Value: 0x04
129 - CStr: CU1
130 - Value: 0x1000
131 - Value: 0x1b
132 - Value: 0x0
133 - AbbrCode: 2
134 Values:
135 - CStr: class1
136 - AbbrCode: 3
137 Values:
138 - Value: 0x00000051
139 - CStr: member1
140 - AbbrCode: 3
141 Values:
142 - Value: 0x00000056
143 - CStr: member2
144 - AbbrCode: 0
145 - AbbrCode: 7
146 Values:
147 - CStr: int
148 - AbbrCode: 7
149 Values:
150 - CStr: char
151 - AbbrCode: 7
152 Values:
153 - CStr: float
154 - AbbrCode: 8
155 Values:
156 - Value: 0x0000002a
157 - AbbrCode: 9
158 Values:
159 - CStr: var1
160 - Value: 0x00000000
161 - Value: 0x00000051
162 - AbbrCode: 10
163 Values:
164 - CStr: foo1
165 - Value: 0x1000
166 - Value: 0x10
167 - Value: 0x0000002e
168 - AbbrCode: 0
169 - AbbrCode: 0
170 ...