194 lines · plain
1# RUN: llvm-mc -triple x86_64-pc-linux %s -o %t.o -filetype=obj2# RUN: llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s3 4# CHECK-NOT: error:5 6# Assembly generated from this source:7# struct t1 { int i; };8# t1 v1;9# and compiled with -g -fdebug-types-section10#11# This demonstrates that llvm-dwarfdump --verify does not try to apply offsets found in the .debug_type12 13 .text14 .file "test.cpp"15 .file 1 "/usr/local/google/home/blaikie/dev/scratch" "test.cpp"16 .section .debug_types,"G",@progbits,14297044602779165170,comdat17 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit18.Ldebug_info_start0:19 .short 4 # DWARF version number20 .long .debug_abbrev # Offset Into Abbrev. Section21 .byte 8 # Address Size (in bytes)22 .quad -4149699470930386446 # Type Signature23 .long 30 # Type DIE Offset24 .byte 1 # Abbrev [1] 0x17:0x25 DW_TAG_type_unit25 .short 33 # DW_AT_language26 .long .Lline_table_start0 # DW_AT_stmt_list27 .byte 2 # Abbrev [2] 0x1e:0x16 DW_TAG_structure_type28 .byte 5 # DW_AT_calling_convention29 .long .Linfo_string6 # DW_AT_name30 .byte 4 # DW_AT_byte_size31 .byte 1 # DW_AT_decl_file32 .byte 1 # DW_AT_decl_line33 .byte 3 # Abbrev [3] 0x27:0xc DW_TAG_member34 .long .Linfo_string4 # DW_AT_name35 .long 52 # DW_AT_type36 .byte 1 # DW_AT_decl_file37 .byte 1 # DW_AT_decl_line38 .byte 0 # DW_AT_data_member_location39 .byte 0 # End Of Children Mark40 .byte 4 # Abbrev [4] 0x34:0x7 DW_TAG_base_type41 .long .Linfo_string5 # DW_AT_name42 .byte 5 # DW_AT_encoding43 .byte 4 # DW_AT_byte_size44 .byte 0 # End Of Children Mark45.Ldebug_info_end0:46 .type v1,@object # @v147 .bss48 .globl v149 .p2align 250v1:51 .zero 452 .size v1, 453 54 .section .debug_abbrev,"",@progbits55 .byte 1 # Abbreviation Code56 .byte 65 # DW_TAG_type_unit57 .byte 1 # DW_CHILDREN_yes58 .byte 19 # DW_AT_language59 .byte 5 # DW_FORM_data260 .byte 16 # DW_AT_stmt_list61 .byte 23 # DW_FORM_sec_offset62 .byte 0 # EOM(1)63 .byte 0 # EOM(2)64 .byte 2 # Abbreviation Code65 .byte 19 # DW_TAG_structure_type66 .byte 1 # DW_CHILDREN_yes67 .byte 54 # DW_AT_calling_convention68 .byte 11 # DW_FORM_data169 .byte 3 # DW_AT_name70 .byte 14 # DW_FORM_strp71 .byte 11 # DW_AT_byte_size72 .byte 11 # DW_FORM_data173 .byte 58 # DW_AT_decl_file74 .byte 11 # DW_FORM_data175 .byte 59 # DW_AT_decl_line76 .byte 11 # DW_FORM_data177 .byte 0 # EOM(1)78 .byte 0 # EOM(2)79 .byte 3 # Abbreviation Code80 .byte 13 # DW_TAG_member81 .byte 0 # DW_CHILDREN_no82 .byte 3 # DW_AT_name83 .byte 14 # DW_FORM_strp84 .byte 73 # DW_AT_type85 .byte 19 # DW_FORM_ref486 .byte 58 # DW_AT_decl_file87 .byte 11 # DW_FORM_data188 .byte 59 # DW_AT_decl_line89 .byte 11 # DW_FORM_data190 .byte 56 # DW_AT_data_member_location91 .byte 11 # DW_FORM_data192 .byte 0 # EOM(1)93 .byte 0 # EOM(2)94 .byte 4 # Abbreviation Code95 .byte 36 # DW_TAG_base_type96 .byte 0 # DW_CHILDREN_no97 .byte 3 # DW_AT_name98 .byte 14 # DW_FORM_strp99 .byte 62 # DW_AT_encoding100 .byte 11 # DW_FORM_data1101 .byte 11 # DW_AT_byte_size102 .byte 11 # DW_FORM_data1103 .byte 0 # EOM(1)104 .byte 0 # EOM(2)105 .byte 5 # Abbreviation Code106 .byte 17 # DW_TAG_compile_unit107 .byte 1 # DW_CHILDREN_yes108 .byte 37 # DW_AT_producer109 .byte 14 # DW_FORM_strp110 .byte 19 # DW_AT_language111 .byte 5 # DW_FORM_data2112 .byte 3 # DW_AT_name113 .byte 14 # DW_FORM_strp114 .byte 16 # DW_AT_stmt_list115 .byte 23 # DW_FORM_sec_offset116 .byte 27 # DW_AT_comp_dir117 .byte 14 # DW_FORM_strp118 .byte 0 # EOM(1)119 .byte 0 # EOM(2)120 .byte 6 # Abbreviation Code121 .byte 52 # DW_TAG_variable122 .byte 0 # DW_CHILDREN_no123 .byte 3 # DW_AT_name124 .byte 14 # DW_FORM_strp125 .byte 73 # DW_AT_type126 .byte 19 # DW_FORM_ref4127 .byte 63 # DW_AT_external128 .byte 25 # DW_FORM_flag_present129 .byte 58 # DW_AT_decl_file130 .byte 11 # DW_FORM_data1131 .byte 59 # DW_AT_decl_line132 .byte 11 # DW_FORM_data1133 .byte 2 # DW_AT_location134 .byte 24 # DW_FORM_exprloc135 .byte 0 # EOM(1)136 .byte 0 # EOM(2)137 .byte 7 # Abbreviation Code138 .byte 19 # DW_TAG_structure_type139 .byte 0 # DW_CHILDREN_no140 .byte 60 # DW_AT_declaration141 .byte 25 # DW_FORM_flag_present142 .byte 105 # DW_AT_signature143 .byte 32 # DW_FORM_ref_sig8144 .byte 0 # EOM(1)145 .byte 0 # EOM(2)146 .byte 0 # EOM(3)147 .section .debug_info,"",@progbits148.Lcu_begin0:149 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit150.Ldebug_info_start1:151 .short 4 # DWARF version number152 .long .debug_abbrev # Offset Into Abbrev. Section153 .byte 8 # Address Size (in bytes)154 .byte 5 # Abbrev [5] 0xb:0x32 DW_TAG_compile_unit155 .long .Linfo_string0 # DW_AT_producer156 .short 33 # DW_AT_language157 .long .Linfo_string1 # DW_AT_name158 .long .Lline_table_start0 # DW_AT_stmt_list159 .long .Linfo_string2 # DW_AT_comp_dir160 .byte 6 # Abbrev [6] 0x1e:0x15 DW_TAG_variable161 .long .Linfo_string3 # DW_AT_name162 .long 51 # DW_AT_type163 # DW_AT_external164 .byte 1 # DW_AT_decl_file165 .byte 2 # DW_AT_decl_line166 .byte 9 # DW_AT_location167 .byte 3168 .quad v1169 .byte 7 # Abbrev [7] 0x33:0x9 DW_TAG_structure_type170 # DW_AT_declaration171 .quad -4149699470930386446 # DW_AT_signature172 .byte 0 # End Of Children Mark173.Ldebug_info_end1:174 .section .debug_str,"MS",@progbits,1175.Linfo_string0:176 .asciz "clang version 14.0.0 (git@github.com:llvm/llvm-project.git 7f00c7ce4b186ab8ba2ae66c82efdcf908c61019)" # string offset=0177.Linfo_string1:178 .asciz "test.cpp" # string offset=101179.Linfo_string2:180 .asciz "/usr/local/google/home/blaikie/dev/scratch" # string offset=110181.Linfo_string3:182 .asciz "v1" # string offset=153183.Linfo_string4:184 .asciz "i" # string offset=156185.Linfo_string5:186 .asciz "int" # string offset=158187.Linfo_string6:188 .asciz "t1" # string offset=162189 .ident "clang version 14.0.0 (git@github.com:llvm/llvm-project.git 7f00c7ce4b186ab8ba2ae66c82efdcf908c61019)"190 .section ".note.GNU-stack","",@progbits191 .addrsig192 .section .debug_line,"",@progbits193.Lline_table_start0:194