127 lines · plain
1# Checks that we correctly display the DW_AT_APPLE_property_name of a2# referenced DW_TAG_APPLE_property.3#4# RUN: llvm-mc -triple=aarch64--darwin -filetype=obj -o %t.o < %s5# RUN: not llvm-dwarfdump %t.o 2> %t.errs.txt | FileCheck %s6# RUN: FileCheck %s --check-prefix=ERRORS < %t.errs.txt 7 8# CHECK: 0x[[PROP_REF:[0-9a-f]+]]: DW_TAG_APPLE_property9# CHECK-NEXT: DW_AT_APPLE_property_name ("autoSynthProp")10#11# CHECK: 0x[[NO_NAME_PROP:[0-9a-f]+]]: DW_TAG_APPLE_property12# CHECK-NOT: DW_AT_APPLE_property_name13#14# CHECK: 0x[[INVALID_STRP:[0-9a-f]+]]: DW_TAG_APPLE_property15# CHECK-NEXT: DW_AT_APPLE_property_name16#17# CHECK: DW_TAG_member18# CHECK: DW_AT_APPLE_property (0x[[PROP_REF]] "autoSynthProp")19# CHECK: DW_AT_APPLE_property (0x[[NO_NAME_PROP]] "")20# CHECK: DW_AT_APPLE_property (0x{{.*}})21# CHECK: DW_AT_APPLE_property (0x{{.*}})22# CHECK: DW_AT_APPLE_property (0x[[INVALID_STRP]])23 24# ERRORS: error: decoding DW_AT_APPLE_property_name: not referencing a DW_TAG_APPLE_property25# ERRORS: error: decoding DW_AT_APPLE_property_name: invalid DIE26# ERRORS: error: decoding DW_AT_APPLE_property_name: DW_FORM_strp offset 102 is beyond .debug_str bounds27 28 .section __DWARF,__debug_abbrev,regular,debug29Lsection_abbrev:30 .byte 1 ; Abbreviation Code31 .byte 17 ; DW_TAG_compile_unit32 .byte 1 ; DW_CHILDREN_yes33 .byte 114 ; DW_AT_str_offsets_base34 .byte 23 ; DW_FORM_sec_offset35 .byte 0 ; EOM(1)36 .byte 0 ; EOM(2)37 .byte 2 ; Abbreviation Code38 .byte 19 ; DW_TAG_structure_type39 .byte 1 ; DW_CHILDREN_yes40 .byte 3 ; DW_AT_name41 .byte 37 ; DW_FORM_strx142 .byte 0 ; EOM(1)43 .byte 0 ; EOM(2)44 .byte 3 ; Abbreviation Code45 .ascii "\200\204\001" ; DW_TAG_APPLE_property46 .byte 0 ; DW_CHILDREN_no47 .ascii "\350\177" ; DW_AT_APPLE_property_name48 .byte 37 ; DW_FORM_strx149 .byte 0 ; EOM(1)50 .byte 0 ; EOM(2)51 .byte 4 ; Abbreviation Code52 .ascii "\200\204\001" ; DW_TAG_APPLE_property53 .byte 0 ; DW_CHILDREN_no54 .byte 0 ; EOM(1)55 .byte 0 ; EOM(2)56 .byte 5 ; Abbreviation Code57 .ascii "\200\204\001" ; DW_TAG_APPLE_property58 .byte 0 ; DW_CHILDREN_no59 .ascii "\350\177" ; DW_AT_APPLE_property_name60 .byte 14 ; DW_FORM_strp61 .byte 0 ; EOM(1)62 .byte 0 ; EOM(2)63 .byte 6 ; Abbreviation Code64 .byte 13 ; DW_TAG_member65 .byte 0 ; DW_CHILDREN_no66 .byte 3 ; DW_AT_name67 .byte 37 ; DW_FORM_strx168 .ascii "\355\177" ; DW_AT_APPLE_property69 .byte 19 ; DW_FORM_ref470 .ascii "\355\177" ; DW_AT_APPLE_property71 .byte 19 ; DW_FORM_ref472 .ascii "\355\177" ; DW_AT_APPLE_property73 .byte 19 ; DW_FORM_ref474 .ascii "\355\177" ; DW_AT_APPLE_property75 .byte 19 ; DW_FORM_ref476 .ascii "\355\177" ; DW_AT_APPLE_property77 .byte 19 ; DW_FORM_ref478 .byte 0 ; EOM(1)79 .byte 0 ; EOM(2)80 .byte 0 ; EOM(3)81 .section __DWARF,__debug_info,regular,debug82Lsection_info:83Lcu_begin0:84Lset0 = Ldebug_info_end0-Ldebug_info_start0 ; Length of Unit85 .long Lset086Ldebug_info_start0:87 .short 5 ; DWARF version number88 .byte 1 ; DWARF Unit Type89 .byte 8 ; Address Size (in bytes)90Lset1 = Lsection_abbrev-Lsection_abbrev ; Offset Into Abbrev. Section91 .long Lset192 .byte 1 ; Abbrev [1] DW_TAG_compile_unit93Lset2 = Lstr_offsets_base0-Lsection_str_off ; DW_AT_str_offsets_base94 .long Lset295 .byte 2 ; Abbrev [2] DW_TAG_structure_type96 .byte 2 ; DW_AT_name97 .byte 3 ; Abbrev [3] DW_TAG_APPLE_property98 .byte 0 ; DW_AT_APPLE_property_name99 .byte 4 ; Abbrev [4] DW_TAG_APPLE_property100 .byte 5 ; Abbrev [5] DW_TAG_APPLE_property101 .long 102 ; DW_AT_APPLE_property_name102 .byte 6 ; Abbrev [6] DW_TAG_member103 .byte 1 ; DW_AT_name104 .long 19 ; DW_AT_APPLE_property105 .long 21 ; DW_AT_APPLE_property106 .long 17 ; DW_AT_APPLE_property107 .long 0 ; DW_AT_APPLE_property108 .long 22 ; DW_AT_APPLE_property109 .byte 0 ; End Of Children Mark110 .byte 0 ; End Of Children Mark111Ldebug_info_end0:112 .section __DWARF,__debug_str_offs,regular,debug113Lsection_str_off:114 .long 16 ; Length of String Offsets Set115 .short 5116 .short 0117Lstr_offsets_base0:118 .section __DWARF,__debug_str,regular,debug119Linfo_string:120 .asciz "autoSynthProp" ; string offset=0121 .asciz "_var" ; string offset=14122 .asciz "Foo" ; string offset=19123 .section __DWARF,__debug_str_offs,regular,debug124 .long 0125 .long 14126 .long 19127