168 lines · plain
1# RUN: llvm-mc %s -filetype obj -triple x86_64-linux-gnu -o - \2# RUN: | not llvm-dwarfdump -v -verify - 2>&1 \3# RUN: | FileCheck %s --implicit-check-not=error --implicit-check-not=warning4 5# CHECK: Verifying dwo Units...6# CHECK: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.7# CHECK: error: Compilation unit type (DW_UT_split_compile) and root DIE (DW_TAG_null) do not match.8# CHECK: error: Unsupported DW_AT_location encoding: DW_FORM_data19# FIXME: This should read "type unit" or just "unit" to be correct for this case/in general10# CHECK: error: DIE has DW_AT_decl_file that references a file with index 1 and the compile unit has no line table11# CHECK: error: Aggregated error counts:12# CHECK: error: Compilation unit root DIE is not a unit DIE occurred 1 time(s).13# CHECK: error: File index in DW_AT_decl_file reference CU with no line table occurred 1 time(s).14# CHECK: error: Invalid DW_AT_location occurred 1 time(s).15# CHECK: error: Mismatched unit type occurred 1 time(s).16# CHECK: Errors detected.17 .section .debug_info.dwo,"e",@progbits18 .long .Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit19.Ldebug_info_dwo_start1:20 .short 5 # DWARF version number21 .byte 5 # DWARF Unit Type22 .byte 8 # Address Size (in bytes)23 .long 0 # Offset Into Abbrev. Section24 .quad 1 # DWO ID25 .quad 026.Ldebug_info_dwo_end1:27 .long .Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit28.Ldebug_info_dwo_start2:29 .short 5 # DWARF version number30 .byte 5 # DWARF Unit Type31 .byte 8 # Address Size (in bytes)32 .long 0 # Offset Into Abbrev. Section33 .quad 2 # DWO ID34 .byte 1 # Abbrev [1] DW_TAG_compile_unit35 .byte 0 # DW_AT_decl_file36 .byte 0 # DW_AT_location37.Ldebug_info_dwo_end2:38.Ldebug_info_dwo_prestart3:39 .long .Ldebug_info_dwo_end3-.Ldebug_info_dwo_start3 # Length of Unit40.Ldebug_info_dwo_start3:41 .short 5 # DWARF version number42 .byte 6 # DWARF Unit Type43 .byte 8 # Address Size (in bytes)44 .long 0 # Offset Into Abbrev. Section45 .quad 3 # Type Signature46 .long .Ldebug_info_dwo_die3-.Ldebug_info_dwo_prestart3 # Type DIE Offset47.Ldebug_info_dwo_die3:48 .byte 2 # Abbrev [2] DW_TAG_type_unit49 .byte 1 # DW_AT_decl_file50.Ldebug_info_dwo_end3:51.Ldebug_info_dwo_prestart4:52 .long .Ldebug_info_dwo_end4-.Ldebug_info_dwo_start4 # Length of Unit53.Ldebug_info_dwo_start4:54 .short 5 # DWARF version number55 .byte 6 # DWARF Unit Type56 .byte 8 # Address Size (in bytes)57 .long 0 # Offset Into Abbrev. Section58 .quad 4 # Type Signature59 .long .Ldebug_info_dwo_die4-.Ldebug_info_dwo_prestart4 # Type DIE Offset60.Ldebug_info_dwo_die4:61 .byte 3 # Abbrev [3] DW_TAG_type_unit62 .long 0 # DW_AT_stmt_list63 .byte 0 # DW_AT_decl_file64.Ldebug_info_dwo_end4:65 .long .Ldebug_info_dwo_end5-.Ldebug_info_dwo_start5 # Length of Unit66.Ldebug_info_dwo_start5:67 .short 5 # DWARF version number68 .byte 5 # DWARF Unit Type69 .byte 8 # Address Size (in bytes)70 .long 0 # Offset Into Abbrev. Section71 .quad 2 # DWO ID72 .byte 4 # Abbrev [1] DW_TAG_compile_unit73 .uleb128 0 # DW_AT_location74.Ldebug_info_dwo_end5:75 .section .debug_abbrev.dwo,"e",@progbits76 .byte 1 # Abbreviation Code77 .byte 17 # DW_TAG_compile_unit78 .byte 0 # DW_CHILDREN_no79 .byte 58 # DW_AT_decl_file80 .byte 11 # DW_FORM_data181 .byte 2 # DW_AT_location82 .byte 11 # DW_FORM_data183 .byte 0 # EOM(1)84 .byte 0 # EOM(2)85 .byte 2 # Abbreviation Code86 .byte 65 # DW_TAG_type_unit87 .byte 0 # DW_CHILDREN_no88 .byte 58 # DW_AT_decl_file89 .byte 11 # DW_FORM_data190 .byte 0 # EOM(1)91 .byte 0 # EOM(2)92 .byte 3 # Abbreviation Code93 .byte 65 # DW_TAG_type_unit94 .byte 0 # DW_CHILDREN_no95 .byte 16 # DW_AT_stmt_list96 .byte 23 # DW_FORM_sec_offset97 .byte 58 # DW_AT_decl_file98 .byte 11 # DW_FORM_data199 .byte 0 # EOM(1)100 .byte 0 # EOM(2)101 .byte 4 # Abbreviation Code102 .byte 17 # DW_TAG_compile_unit103 .byte 0 # DW_CHILDREN_no104 .byte 2 # DW_AT_location105 .byte 34 # DW_FORM_loclistx106 .byte 0 # EOM(1)107 .byte 0 # EOM(2)108 .byte 0 # EOM(3)109 .section .debug_line.dwo,"e",@progbits110.Ltmp2:111 .long .Ldebug_line_end0-.Ldebug_line_start0 # unit length112.Ldebug_line_start0:113 .short 5114 .byte 8115 .byte 0116 .long .Lprologue_end0-.Lprologue_start0117.Lprologue_start0:118 .byte 1119 .byte 1120 .byte 1121 .byte -5122 .byte 14123 .byte 1124 .byte 1125 .byte 1126 .byte 8127 .byte 1128 .ascii "/usr/local/google/home/blaikie/dev/scratch"129 .byte 0130 .byte 3131 .byte 1132 .byte 8133 .byte 2134 .byte 15135 .byte 5136 .byte 30137 .byte 1138 .ascii "test.cpp"139 .byte 0140 .byte 0141 .byte 0x5e, 0xc4, 0x4d, 0x3b142 .byte 0x78, 0xd0, 0x2a, 0x57143 .byte 0xd2, 0x75, 0xc1, 0x22144 .byte 0x36, 0xb7, 0x17, 0xbf145.Lprologue_end0:146.Ldebug_line_end0:147 .section .debug_loclists.dwo,"e",@progbits148 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length149.Ldebug_list_header_start0:150 .short 5 # Version151 .byte 8 # Address size152 .byte 0 # Segment selector size153 .long 1 # Offset entry count154.Lloclists_table_base0:155 .long .Ldebug_loc0-.Lloclists_table_base0156.Ldebug_loc0:157 .byte 1 # DW_LLE_base_addressx158 .byte 0 # base address index159 .byte 4 # DW_LLE_offset_pair160 .uleb128 0 # starting offset161 .uleb128 1 # ending offset162 .byte 3 # Loc expr size163 .byte 17 # DW_OP_consts164 .byte 3 # 3165 .byte 159 # DW_OP_stack_value166 .byte 0 # DW_LLE_end_of_list167.Ldebug_list_header_end0:168