185 lines · plain
1## This test checks DWARFv4 DW_MACINFO_start_file2## , DW_MACINFO_end_file, DW_MACINFO_define,3## DW_MACINFO_UNDEF attributes.4 5# RUN: yaml2obj %s -o %t.o6# RUN: llvm-dwarfutil %t.o %t17# RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s8# RUN: llvm-dwarfdump -a %t1 | FileCheck %s9 10# RUN: llvm-dwarfutil --linker parallel %t.o %t111# RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s12# RUN: llvm-dwarfdump -a %t1 | FileCheck %s13 14# VERIFY: No errors.15 16## Content: "03000201064400020744000400":17#18## .byte 3 # DW_MACINFO_start_file19## .byte 0 # Line Number20## .byte 2 # File Number21## .byte 1 # DW_MACINFO_define22## .byte 6 # Line Number23## .asciz "D" # Macro String24## .byte 2 # DW_MACINFO_undef25## .byte 7 # Line Number26## .asciz "D" # Macro String27## .byte 4 # DW_MACINFO_end_file28## .byte 0 # End Of Macro List Mark29 30#CHECK: .debug_info contents:31#CHECK: DW_TAG_compile_unit32#CHECK: DW_AT_name ("CU1")33#CHECK: DW_AT_macro_info (0x00000000)34#CHECK: .debug_macinfo contents:35#CHECK: 0x00000000:36#CHECK: DW_MACINFO_start_file - lineno: 0 filenum: 237#CHECK: DW_MACINFO_define - lineno: 6 macro: D38#CHECK: DW_MACINFO_undef - lineno: 7 macro: D39#CHECK: DW_MACINFO_end_file40 41--- !ELF42FileHeader:43 Class: ELFCLASS6444 Data: ELFDATA2LSB45 Type: ET_REL46 Machine: EM_X86_6447Sections:48 - Name: .text49 Type: SHT_PROGBITS50 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]51 Address: 0x100052 Size: 0x1b53 - Name: .debug_macinfo54 Type: SHT_PROGBITS55 Flags: [ ]56 Content: "03000201064400020744000400"57DWARF:58 debug_abbrev:59 - Table:60 - Tag: DW_TAG_compile_unit61 Children: DW_CHILDREN_yes62 Attributes:63 - Attribute: DW_AT_producer64 Form: DW_FORM_string65 - Attribute: DW_AT_language66 Form: DW_FORM_data267 - Attribute: DW_AT_name68 Form: DW_FORM_string69 - Attribute: DW_AT_low_pc70 Form: DW_FORM_addr71 - Attribute: DW_AT_high_pc72 Form: DW_FORM_data873 - Attribute: DW_AT_macro_info74 Form: DW_FORM_sec_offset75 - Tag: DW_TAG_class_type76 Children: DW_CHILDREN_yes77 Attributes:78 - Attribute: DW_AT_name79 Form: DW_FORM_string80 - Tag: DW_TAG_member81 Children: DW_CHILDREN_no82 Attributes:83 - Attribute: DW_AT_type84 Form: DW_FORM_ref485 - Attribute: DW_AT_name86 Form: DW_FORM_string87 - Tag: DW_TAG_class_type88 Children: DW_CHILDREN_no89 Attributes:90 - Attribute: DW_AT_name91 Form: DW_FORM_string92 - Attribute: DW_AT_declaration93 Form: DW_FORM_flag_present94 - Tag: DW_TAG_class_type95 Children: DW_CHILDREN_yes96 Attributes:97 - Attribute: DW_AT_name98 Form: DW_FORM_string99 - Attribute: DW_AT_declaration100 Form: DW_FORM_flag_present101 - Tag: DW_TAG_template_type_parameter102 Children: DW_CHILDREN_no103 Attributes:104 - Attribute: DW_AT_type105 Form: DW_FORM_ref4106 - Tag: DW_TAG_base_type107 Children: DW_CHILDREN_no108 Attributes:109 - Attribute: DW_AT_name110 Form: DW_FORM_string111 - Tag: DW_TAG_pointer_type112 Children: DW_CHILDREN_no113 Attributes:114 - Attribute: DW_AT_type115 Form: DW_FORM_ref4116 - Tag: DW_TAG_variable117 Children: DW_CHILDREN_no118 Attributes:119 - Attribute: DW_AT_name120 Form: DW_FORM_string121 - Attribute: DW_AT_const_value122 Form: DW_FORM_data4123 - Attribute: DW_AT_type124 Form: DW_FORM_ref4125 - Tag: DW_TAG_subprogram126 Children: DW_CHILDREN_no127 Attributes:128 - Attribute: DW_AT_name129 Form: DW_FORM_string130 - Attribute: DW_AT_low_pc131 Form: DW_FORM_addr132 - Attribute: DW_AT_high_pc133 Form: DW_FORM_data8134 - Attribute: DW_AT_type135 Form: DW_FORM_ref4136 debug_info:137 - Version: 4138 Entries:139 - AbbrCode: 1140 Values:141 - CStr: by_hand142 - Value: 0x04143 - CStr: CU1144 - Value: 0x1000145 - Value: 0x1b146 - Value: 0x0147 - AbbrCode: 2148 Values:149 - CStr: class1150 - AbbrCode: 3151 Values:152 - Value: 0x00000051153 - CStr: member1154 - AbbrCode: 3155 Values:156 - Value: 0x00000056157 - CStr: member2158 - AbbrCode: 0159 - AbbrCode: 7160 Values:161 - CStr: int162 - AbbrCode: 7163 Values:164 - CStr: char165 - AbbrCode: 7166 Values:167 - CStr: float168 - AbbrCode: 8169 Values:170 - Value: 0x0000002a171 - AbbrCode: 9172 Values:173 - CStr: var1174 - Value: 0x00000000175 - Value: 0x00000051176 - AbbrCode: 10177 Values:178 - CStr: foo1179 - Value: 0x1000180 - Value: 0x10181 - Value: 0x0000002e182 - AbbrCode: 0183 - AbbrCode: 0184...185