149 lines · plain
1# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \2# RUN: not llvm-dwarfdump -verify - | FileCheck %s3 4# CHECK: error: NameIndex @ 0x0: Abbreviation 0x2: DW_IDX_compile_unit uses an unexpected form DW_FORM_ref1 (expected form class constant).5# CHECK: error: NameIndex @ 0x0: Abbreviation 0x2: DW_IDX_type_unit uses an unexpected form DW_FORM_ref1 (expected form class constant).6# CHECK: error: NameIndex @ 0x0: Abbreviation 0x2: DW_IDX_type_hash uses an unexpected form DW_FORM_data4 (should be DW_FORM_data8).7# CHECK: warning: NameIndex @ 0x0: Abbreviation 0x2 contains an unknown index attribute: DW_IDX_unknown_2020.8# CHECK: error: NameIndex @ 0x0: Abbreviation 0x4 contains multiple DW_IDX_die_offset attributes.9# CHECK: NameIndex @ 0x0: Abbreviation 0x1: DW_IDX_die_offset uses an unknown form: DW_FORM_unknown_1fff.10# CHECK: warning: NameIndex @ 0x0: Abbreviation 0x3 references an unknown tag: DW_TAG_unknown_8080.11# CHECK: error: NameIndex @ 0x0: Abbreviation 0x5 has no DW_IDX_die_offset attribute.12# CHECK: error: NameIndex @ 0x55: Indexing multiple compile units and abbreviation 0x1 has no DW_IDX_compile_unit or DW_IDX_type_unit attribute.13 14 .section .debug_str,"MS",@progbits,115.Lstring_producer:16 .asciz "Hand-written dwarf"17 18 .section .debug_abbrev,"",@progbits19.Lsection_abbrev:20 .byte 1 # Abbreviation Code21 .byte 17 # DW_TAG_compile_unit22 .byte 1 # DW_CHILDREN_yes23 .byte 37 # DW_AT_producer24 .byte 14 # DW_FORM_strp25 .byte 19 # DW_AT_language26 .byte 5 # DW_FORM_data227 .byte 0 # EOM(1)28 .byte 0 # EOM(2)29 .byte 0 # EOM(3)30 31 .section .debug_info,"",@progbits32.Lcu_begin0:33 .long .Lcu_end0-.Lcu_start0 # Length of Unit34.Lcu_start0:35 .short 4 # DWARF version number36 .long .Lsection_abbrev # Offset Into Abbrev. Section37 .byte 8 # Address Size (in bytes)38 .byte 1 # Abbrev [1] DW_TAG_compile_unit39 .long .Lstring_producer # DW_AT_producer40 .short 12 # DW_AT_language41 .byte 0 # End Of Children Mark42.Lcu_end0:43 44.Lcu_begin1:45 .long .Lcu_end1-.Lcu_start1 # Length of Unit46.Lcu_start1:47 .short 4 # DWARF version number48 .long .Lsection_abbrev # Offset Into Abbrev. Section49 .byte 8 # Address Size (in bytes)50 .byte 1 # Abbrev [1] DW_TAG_compile_unit51 .long .Lstring_producer # DW_AT_producer52 .short 12 # DW_AT_language53 .byte 0 # End Of Children Mark54.Lcu_end1:55 56.Lcu_begin2:57 .long .Lcu_end2-.Lcu_start2 # Length of Unit58.Lcu_start2:59 .short 4 # DWARF version number60 .long .Lsection_abbrev # Offset Into Abbrev. Section61 .byte 8 # Address Size (in bytes)62 .byte 1 # Abbrev [1] DW_TAG_compile_unit63 .long .Lstring_producer # DW_AT_producer64 .short 12 # DW_AT_language65 .byte 0 # End Of Children Mark66.Lcu_end2:67 68 .section .debug_names,"",@progbits69 .long .Lnames_end0-.Lnames_start0 # Header: contribution length70.Lnames_start0:71 .short 5 # Header: version72 .short 0 # Header: padding73 .long 1 # Header: compilation unit count74 .long 0 # Header: local type unit count75 .long 0 # Header: foreign type unit count76 .long 0 # Header: bucket count77 .long 0 # Header: name count78 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size79 .long 0 # Header: augmentation length80 .long .Lcu_begin0 # Compilation unit 081.Lnames_abbrev_start0:82 .byte 1 # Abbrev code83 .byte 46 # DW_TAG_subprogram84 .byte 3 # DW_IDX_die_offset85 .uleb128 0x1fff # DW_FORM_unknown_1fff86 .byte 0 # End of abbrev87 .byte 0 # End of abbrev88 .byte 2 # Abbrev code89 .byte 46 # DW_TAG_subprogram90 .byte 1 # DW_IDX_compile_unit91 .byte 17 # DW_FORM_ref192 .byte 2 # DW_IDX_type_unit93 .byte 17 # DW_FORM_ref194 .byte 2 # DW_IDX_type_unit95 .byte 5 # DW_FORM_data296 .byte 5 # DW_IDX_type_hash97 .byte 6 # DW_FORM_data498 .uleb128 0x2020 # DW_IDX_unknown_202099 .byte 6 # DW_FORM_data4100 .byte 0 # End of abbrev101 .byte 0 # End of abbrev102 .byte 3 # Abbrev code103 .uleb128 0x8080 # DW_TAG_unknown_8080104 .byte 3 # DW_IDX_die_offset105 .byte 17 # DW_FORM_ref1106 .byte 0 # End of abbrev107 .byte 0 # End of abbrev108 .byte 4 # Abbrev code109 .byte 46 # DW_TAG_subprogram110 .byte 3 # DW_IDX_die_offset111 .byte 17 # DW_FORM_ref1112 .byte 3 # DW_IDX_die_offset113 .byte 17 # DW_FORM_ref1114 .byte 0 # End of abbrev115 .byte 0 # End of abbrev116 .byte 5 # Abbrev code117 .byte 46 # DW_TAG_subprogram118 .byte 4 # DW_IDX_parent119 .byte 5 # DW_FORM_data2120 .byte 0 # End of abbrev121 .byte 0 # End of abbrev122 .byte 0 # End of abbrev list123.Lnames_abbrev_end0:124.Lnames_end0:125 126 .long .Lnames_end1-.Lnames_start1 # Header: contribution length127.Lnames_start1:128 .short 5 # Header: version129 .short 0 # Header: padding130 .long 2 # Header: compilation unit count131 .long 0 # Header: local type unit count132 .long 0 # Header: foreign type unit count133 .long 0 # Header: bucket count134 .long 0 # Header: name count135 .long .Lnames_abbrev_end1-.Lnames_abbrev_start1 # Header: abbreviation table size136 .long 0 # Header: augmentation length137 .long .Lcu_begin1 # Compilation unit 0138 .long .Lcu_begin2 # Compilation unit 1139.Lnames_abbrev_start1:140 .byte 1 # Abbrev code141 .byte 46 # DW_TAG_subprogram142 .byte 3 # DW_IDX_die_offset143 .byte 17 # DW_FORM_ref1144 .byte 0 # End of abbrev145 .byte 0 # End of abbrev146 .byte 0 # End of abbrev list147.Lnames_abbrev_end1:148.Lnames_end1:149