Debian Codegraph @

llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-macro-opcodeop.test

raw
1 ## This test checks that error is reported if opcode_operands_table_flag
2 ## is used.
3
4 # RUN: yaml2obj %s -o %t.o
5 # RUN: llvm-dwarfutil %t.o %t1 2>&1 | FileCheck --check-prefix=ERR %s
6 # RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s
7 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
8
9 # RUN: llvm-dwarfutil --linker parallel %t.o %t1 2>&1 | FileCheck --check-prefix=ERR %s
10 # RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s
11 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
12
13 # ERR: error: opcode_operands_table is not supported
14
15 # VERIFY: No errors.
16
17 ## Content: "05000403000200":
18 #
19 ## .short 5 # Macro information version
20 ## .byte 0 # Flags: 32 bit
21 ## .byte 3 # DW_MACRO_start_file
22 ## .byte 0 # Line Number
23 ## .byte 2 # File Number
24 ## .byte 0 # End Of Macro List Mark
25
26 #CHECK: .debug_info contents:
27 #CHECK: DW_TAG_compile_unit
28 #CHECK: DW_AT_name ("CU1")
29 #CHECK-NOT: DW_AT_macros
30 #CHECK-NOT: .debug_macro contents:
31
32 --- !ELF
33 FileHeader:
34 Class: ELFCLASS64
35 Data: ELFDATA2LSB
36 Type: ET_REL
37 Machine: EM_X86_64
38 Sections:
39 - Name: .text
40 Type: SHT_PROGBITS
41 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
42 Address: 0x1000
43 Size: 0x1b
44 - Name: .debug_macro
45 Type: SHT_PROGBITS
46 Flags: [ ]
47 Content: "05000403000200"
48 - Name: .debug_str_offsets
49 Type: SHT_PROGBITS
50 Flags: [ ]
51 Content: "080000000500000000000000"
52 DWARF:
53 debug_abbrev:
54 - Table:
55 - Tag: DW_TAG_compile_unit
56 Children: DW_CHILDREN_yes
57 Attributes:
58 - Attribute: DW_AT_producer
59 Form: DW_FORM_string
60 - Attribute: DW_AT_language
61 Form: DW_FORM_data2
62 - Attribute: DW_AT_name
63 Form: DW_FORM_string
64 - Attribute: DW_AT_low_pc
65 Form: DW_FORM_addr
66 - Attribute: DW_AT_high_pc
67 Form: DW_FORM_data8
68 - Attribute: DW_AT_macros
69 Form: DW_FORM_sec_offset
70 - Attribute: DW_AT_str_offsets_base
71 Form: DW_FORM_sec_offset
72 - Tag: DW_TAG_class_type
73 Children: DW_CHILDREN_yes
74 Attributes:
75 - Attribute: DW_AT_name
76 Form: DW_FORM_string
77 - Tag: DW_TAG_member
78 Children: DW_CHILDREN_no
79 Attributes:
80 - Attribute: DW_AT_type
81 Form: DW_FORM_ref4
82 - Attribute: DW_AT_name
83 Form: DW_FORM_string
84 - Tag: DW_TAG_class_type
85 Children: DW_CHILDREN_no
86 Attributes:
87 - Attribute: DW_AT_name
88 Form: DW_FORM_string
89 - Attribute: DW_AT_declaration
90 Form: DW_FORM_flag_present
91 - Tag: DW_TAG_class_type
92 Children: DW_CHILDREN_yes
93 Attributes:
94 - Attribute: DW_AT_name
95 Form: DW_FORM_string
96 - Attribute: DW_AT_declaration
97 Form: DW_FORM_flag_present
98 - Tag: DW_TAG_template_type_parameter
99 Children: DW_CHILDREN_no
100 Attributes:
101 - Attribute: DW_AT_type
102 Form: DW_FORM_ref4
103 - Tag: DW_TAG_base_type
104 Children: DW_CHILDREN_no
105 Attributes:
106 - Attribute: DW_AT_name
107 Form: DW_FORM_string
108 - Tag: DW_TAG_pointer_type
109 Children: DW_CHILDREN_no
110 Attributes:
111 - Attribute: DW_AT_type
112 Form: DW_FORM_ref4
113 - Tag: DW_TAG_variable
114 Children: DW_CHILDREN_no
115 Attributes:
116 - Attribute: DW_AT_name
117 Form: DW_FORM_string
118 - Attribute: DW_AT_const_value
119 Form: DW_FORM_data4
120 - Attribute: DW_AT_type
121 Form: DW_FORM_ref4
122 - Tag: DW_TAG_subprogram
123 Children: DW_CHILDREN_no
124 Attributes:
125 - Attribute: DW_AT_name
126 Form: DW_FORM_string
127 - Attribute: DW_AT_low_pc
128 Form: DW_FORM_addr
129 - Attribute: DW_AT_high_pc
130 Form: DW_FORM_data8
131 - Attribute: DW_AT_type
132 Form: DW_FORM_ref4
133 debug_info:
134 - Version: 5
135 UnitType: DW_UT_compile
136 Entries:
137 - AbbrCode: 1
138 Values:
139 - CStr: by_hand
140 - Value: 0x04
141 - CStr: CU1
142 - Value: 0x1000
143 - Value: 0x1b
144 - Value: 0x0
145 - Value: 0x8
146 - AbbrCode: 2
147 Values:
148 - CStr: class1
149 - AbbrCode: 3
150 Values:
151 - Value: 0x00000056
152 - CStr: member1
153 - AbbrCode: 3
154 Values:
155 - Value: 0x0000005b
156 - CStr: member2
157 - AbbrCode: 0
158 - AbbrCode: 7
159 Values:
160 - CStr: int
161 - AbbrCode: 7
162 Values:
163 - CStr: char
164 - AbbrCode: 7
165 Values:
166 - CStr: float
167 - AbbrCode: 8
168 Values:
169 - Value: 0x00000033
170 - AbbrCode: 9
171 Values:
172 - CStr: var1
173 - Value: 0x00000000
174 - Value: 0x00000056
175 - AbbrCode: 10
176 Values:
177 - CStr: foo1
178 - Value: 0x1000
179 - Value: 0x10
180 - Value: 0x00000033
181 - AbbrCode: 0
182 - AbbrCode: 0
183 debug_str:
184 - 'aa'
185 ...