189 lines · plain
1# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o - | not llvm-dwarfdump -verify - | FileCheck %s2 3# CHECK: error: Name Index @ 0x0: Unable to get string associated with name 1.4# CHECK: error: Name Index @ 0x0: Entry @ 0x73 contains an invalid CU index (47).5# CHECK: error: Name Index @ 0x0: Entry @ 0x79 references a DIE @ 0x3fa when CU or TU ends at 0x1e.6# CHECK: error: Name Index @ 0x0: Entry @ 0x85 references a DIE @ 0x30 when CU or TU ends at 0x1e.7# CHECK: error: Name Index @ 0x0: Entry @ 0x8b: mismatched Tag of DIE @ 0x17: index - DW_TAG_subprogram; debug_info - DW_TAG_variable.8# CHECK: error: Name Index @ 0x0: Entry @ 0x91: mismatched Name of DIE @ 0x35: index - foo; debug_info - bar, _Z3bar.9# CHECK: error: Name Index @ 0x0: Name 2 (foo): Incorrectly terminated entry list.10# CHECK: error: Name Index @ 0x0: Name 3 (bar) is not associated with any entries.11# CHECK: error: Name Index @ 0x0: Entry @ 0x69: mismatched Name of DIE @ 0x1c: index - (pseudonymous namespace); debug_info - (anonymous namespace).12 13 .section .debug_str,"MS",@progbits,114.Lstring_foo:15 .asciz "foo"16.Lstring_bar:17 .asciz "bar"18.Lstring_bar_mangled:19 .asciz "_Z3bar"20.Lstring_pseudo_namespace:21 .asciz "(pseudonymous namespace)"22.Lstring_producer:23 .asciz "Hand-written dwarf"24 25 .section .debug_abbrev,"",@progbits26.Lsection_abbrev:27 .byte 1 # Abbreviation Code28 .byte 17 # DW_TAG_compile_unit29 .byte 1 # DW_CHILDREN_yes30 .byte 37 # DW_AT_producer31 .byte 14 # DW_FORM_strp32 .byte 19 # DW_AT_language33 .byte 5 # DW_FORM_data234 .byte 0 # EOM(1)35 .byte 0 # EOM(2)36 .byte 2 # Abbreviation Code37 .byte 46 # DW_TAG_subprogram38 .byte 0 # DW_CHILDREN_no39 .byte 3 # DW_AT_name40 .byte 14 # DW_FORM_strp41 .byte 63 # DW_AT_external42 .byte 25 # DW_FORM_flag_present43 .byte 0 # EOM(1)44 .byte 0 # EOM(2)45 .byte 3 # Abbreviation Code46 .byte 52 # DW_TAG_variable47 .byte 0 # DW_CHILDREN_no48 .byte 3 # DW_AT_name49 .byte 14 # DW_FORM_strp50 .byte 0 # EOM(1)51 .byte 0 # EOM(2)52 .byte 4 # Abbreviation Code53 .byte 57 # DW_TAG_namespace54 .byte 0 # DW_CHILDREN_no55 .byte 0 # EOM(1)56 .byte 0 # EOM(2)57 .byte 5 # Abbreviation Code58 .byte 52 # DW_TAG_variable59 .byte 0 # DW_CHILDREN_no60 .byte 3 # DW_AT_name61 .byte 14 # DW_FORM_strp62 .byte 110 # DW_AT_linkage_name63 .byte 14 # DW_FORM_strp64 .byte 0 # EOM(1)65 .byte 0 # EOM(2)66 .byte 0 # EOM(3)67 68 .section .debug_info,"",@progbits69.Lcu_begin0:70 .long .Lcu_end0-.Lcu_start0 # Length of Unit71.Lcu_start0:72 .short 4 # DWARF version number73 .long .Lsection_abbrev # Offset Into Abbrev. Section74 .byte 8 # Address Size (in bytes)75 .byte 1 # Abbrev [1] DW_TAG_compile_unit76 .long .Lstring_producer # DW_AT_producer77 .short 12 # DW_AT_language78.Ldie_foo:79 .byte 2 # Abbrev [2] DW_TAG_subprogram80 .long .Lstring_foo # DW_AT_name81 # DW_AT_external82.Ldie_foo_var:83 .byte 3 # Abbrev [3] DW_TAG_variable84 .long .Lstring_foo # DW_AT_name85.Ldie_namespace:86 .byte 4 # Abbrev [3] DW_TAG_namespace87 .byte 0 # End Of Children Mark88.Lcu_end0:89 90.Lcu_begin1:91 .long .Lcu_end1-.Lcu_start1 # Length of Unit92.Lcu_start1:93 .short 4 # DWARF version number94 .long .Lsection_abbrev # Offset Into Abbrev. Section95 .byte 8 # Address Size (in bytes)96 .byte 1 # Abbrev [1] DW_TAG_compile_unit97 .long .Lstring_producer # DW_AT_producer98 .short 12 # DW_AT_language99.Ldie_foo2:100 .byte 2 # Abbrev [2] DW_TAG_subprogram101 .long .Lstring_foo # DW_AT_name102 # DW_AT_external103.Ldie_bar_linkage:104 .byte 5 # Abbrev [2] DW_TAG_variable105 .long .Lstring_bar # DW_AT_name106 .long .Lstring_bar_mangled # DW_AT_linkage_name107 .byte 0 # End Of Children Mark108.Lcu_end1:109 110 111 .section .debug_names,"",@progbits112 .long .Lnames_end0-.Lnames_start0 # Header: contribution length113.Lnames_start0:114 .short 5 # Header: version115 .short 0 # Header: padding116 .long 2 # Header: compilation unit count117 .long 0 # Header: local type unit count118 .long 0 # Header: foreign type unit count119 .long 0 # Header: bucket count120 .long 4 # Header: name count121 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size122 .long 0 # Header: augmentation length123 .long .Lcu_begin0 # Compilation unit 0124 .long .Lcu_begin1 # Compilation unit 1125 .long .Lstring_foo+1000 # String 1: <broken>126 .long .Lstring_foo # String 2: foo127 .long .Lstring_bar # String 3: bar128 .long .Lstring_pseudo_namespace # String 4: (pseudonymous namespace)129 .long .Lnames0-.Lnames_entries0 # Offset 1130 .long .Lnames0-.Lnames_entries0 # Offset 2131 .long .Lnames1-.Lnames_entries0 # Offset 3132 .long .Lnames2-.Lnames_entries0 # Offset 4133.Lnames_abbrev_start0:134 .byte 46 # Abbrev code135 .byte 46 # DW_TAG_subprogram136 .byte 1 # DW_IDX_compile_unit137 .byte 11 # DW_FORM_data1138 .byte 3 # DW_IDX_die_offset139 .byte 19 # DW_FORM_ref4140 .byte 0 # End of abbrev141 .byte 0 # End of abbrev142 .byte 57 # Abbrev code143 .byte 57 # DW_TAG_namespace144 .byte 1 # DW_IDX_compile_unit145 .byte 11 # DW_FORM_data1146 .byte 3 # DW_IDX_die_offset147 .byte 19 # DW_FORM_ref4148 .byte 0 # End of abbrev149 .byte 0 # End of abbrev150 .byte 52 # Abbrev code151 .byte 52 # DW_TAG_variable152 .byte 1 # DW_IDX_compile_unit153 .byte 11 # DW_FORM_data1154 .byte 3 # DW_IDX_die_offset155 .byte 19 # DW_FORM_ref4156 .byte 0 # End of abbrev157 .byte 0 # End of abbrev158 .byte 0 # End of abbrev list159.Lnames_abbrev_end0:160.Lnames_entries0:161.Lnames1:162 .long 0 # End of list: bar163.Lnames2:164 .byte 57 # Abbrev code165 .byte 0 # DW_IDX_compile_unit166 .long .Ldie_namespace-.Lcu_begin0 # DW_IDX_die_offset167 .long 0 # End of list: (pseudonymous namespace)168.Lnames0:169 .byte 46 # Abbrev code170 .byte 47 # DW_IDX_compile_unit171 .long .Ldie_foo-.Lcu_begin0 # DW_IDX_die_offset172 .byte 46 # Abbrev code173 .byte 0 # DW_IDX_compile_unit174 .long .Ldie_foo-.Lcu_begin0+1000 # DW_IDX_die_offset175 .byte 46 # Abbrev code176 .byte 0 # DW_IDX_compile_unit177 .long .Ldie_foo-.Lcu_begin0 # DW_IDX_die_offset178 .byte 46 # Abbrev code179 .byte 0 # DW_IDX_compile_unit180 .long .Ldie_foo2-.Lcu_begin0 # DW_IDX_die_offset181 .byte 46 # Abbrev code182 .byte 0 # DW_IDX_compile_unit183 .long .Ldie_foo_var-.Lcu_begin0 # DW_IDX_die_offset184 .byte 52 # Abbrev code185 .byte 1 # DW_IDX_compile_unit186 .long .Ldie_bar_linkage-.Lcu_begin1 # DW_IDX_die_offset187 #.long 0 # End of list deliberately missing188.Lnames_end0:189