1 ## This test checks DWARFv5 DW_MACRO_start_file,
2 ## DW_MACRO_end_file, DW_MACRO_define, DW_MACRO_undef,
3 ## DW_MACRO_define_strp, DW_MACRO_undef_strp,
4 ## DW_MACRO_define_strx, DW_MACRO_undef_strx attributes.
6 # RUN: yaml2obj %s -o %t.o
7 # RUN: llvm-dwarfutil %t.o %t1 2>&1 | FileCheck --check-prefix=WARN %s
8 # RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s
9 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
11 # RUN: llvm-dwarfutil --linker parallel %t.o %t1 2>&1 | FileCheck --check-prefix=WARN %s
12 # RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s
13 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
15 # WARN: warning: DW_MACRO_define_strx unsupported yet. Convert to DW_MACRO_define_strp.
16 # WARN: warning: DW_MACRO_undef_strx unsupported yet. Convert to DW_MACRO_undef_strp.
17 # WARN: warning: DW_MACRO_import and DW_MACRO_import_sup are unsupported yet. remove.
21 ## Content: "05000003000201004400020144000503000000000604000000000b03000c040007000000000400":
23 ## .short 5 # Macro information version
24 ## .byte 0 # Flags: 32 bit
25 ## .byte 3 # DW_MACRO_start_file
26 ## .byte 0 # Line Number
27 ## .byte 2 # File Number
28 ## .byte 1 # DW_MACRO_define
29 ## .byte 0 # Line Number
30 ## .asciz "D" # Macro String
31 ## .byte 2 # DW_MACRO_undef
32 ## .byte 1 # Line Number
33 ## .asciz "D" # Macro String
34 ## .byte 5 # DW_MACRO_define_strp
35 ## .byte 3 # Line Number
36 ## .int 00000000 # Macro String
37 ## .byte 6 # DW_MACRO_undef_strp
38 ## .byte 4 # Line Number
39 ## .int 00000000 # Macro String
40 ## .byte 11 # DW_MACRO_define_strx
41 ## .byte 3 # Line Number
42 ## .byte 00 # Macro String
43 ## .byte 12 # DW_MACRO_undef_strx
44 ## .byte 4 # Line Number
45 ## .byte 00 # Macro String
46 ## .byte 7 # DW_MACRO_import
48 ## .byte 4 # DW_MACRO_end_file
49 ## .byte 0 # End Of Macro List Mark
51 #CHECK: .debug_info contents:
52 #CHECK: DW_TAG_compile_unit
53 #CHECK: DW_AT_name ("CU1")
54 #CHECK: DW_AT_macros (0x00000000)
55 #CHECK: .debug_macro contents:
57 #CHECK: DW_MACRO_start_file - lineno: 0 filenum: 2
58 #CHECK-NEXT: DW_MACRO_define - lineno: 0 macro: D
59 #CHECK-NEXT: DW_MACRO_undef - lineno: 1 macro: D
60 #CHECK-NEXT: DW_MACRO_define_strp - lineno: 3 macro: aa
61 #CHECK-NEXT: DW_MACRO_undef_strp - lineno: 4 macro: aa
62 #CHECK-NEXT: DW_MACRO_define_strp - lineno: 3 macro: aa
63 #CHECK-NEXT: DW_MACRO_undef_strp - lineno: 4 macro: aa
64 #CHECK-NEXT: DW_MACRO_end_file
75 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
81 Content: "05000003000201004400020144000503000000000604000000000b03000c040007000000000400"
82 - Name: .debug_str_offsets
85 Content: "080000000500000000000000"
89 - Tag: DW_TAG_compile_unit
90 Children: DW_CHILDREN_yes
92 - Attribute: DW_AT_producer
94 - Attribute: DW_AT_language
96 - Attribute: DW_AT_name
98 - Attribute: DW_AT_low_pc
100 - Attribute: DW_AT_high_pc
102 - Attribute: DW_AT_macros
103 Form: DW_FORM_sec_offset
104 - Attribute: DW_AT_str_offsets_base
105 Form: DW_FORM_sec_offset
106 - Tag: DW_TAG_class_type
107 Children: DW_CHILDREN_yes
109 - Attribute: DW_AT_name
112 Children: DW_CHILDREN_no
114 - Attribute: DW_AT_type
116 - Attribute: DW_AT_name
118 - Tag: DW_TAG_class_type
119 Children: DW_CHILDREN_no
121 - Attribute: DW_AT_name
123 - Attribute: DW_AT_declaration
124 Form: DW_FORM_flag_present
125 - Tag: DW_TAG_class_type
126 Children: DW_CHILDREN_yes
128 - Attribute: DW_AT_name
130 - Attribute: DW_AT_declaration
131 Form: DW_FORM_flag_present
132 - Tag: DW_TAG_template_type_parameter
133 Children: DW_CHILDREN_no
135 - Attribute: DW_AT_type
137 - Tag: DW_TAG_base_type
138 Children: DW_CHILDREN_no
140 - Attribute: DW_AT_name
142 - Tag: DW_TAG_pointer_type
143 Children: DW_CHILDREN_no
145 - Attribute: DW_AT_type
147 - Tag: DW_TAG_variable
148 Children: DW_CHILDREN_no
150 - Attribute: DW_AT_name
152 - Attribute: DW_AT_const_value
154 - Attribute: DW_AT_type
156 - Tag: DW_TAG_subprogram
157 Children: DW_CHILDREN_no
159 - Attribute: DW_AT_name
161 - Attribute: DW_AT_low_pc
163 - Attribute: DW_AT_high_pc
165 - Attribute: DW_AT_type
169 UnitType: DW_UT_compile