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