125 lines · plain
1# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o2# RUN: llvm-dwarfdump %t.o | FileCheck %s3# RUN: not llvm-dwarfdump -verify %t.o4 5# CHECK: DW_AT_location (DW_OP_addr 0x{{[0-9a-f]+}}, DW_OP_convert <invalid base_type ref: 0x{{[0-9a-f]+}}>, DW_OP_convert (0x{{[0-9a-f]+}}) "DW_ATE_signed_32")6 7 .text8 .file "dbg.g.c"9 .file 1 "/tmp/dbg.g.c"10 .type global,@object # @global11 .data12 .globl global13 .p2align 214global:15 .long 255 # 0xff16 .size global, 417 18 .section .debug_str,"MS",@progbits,119.Linfo_string0:20 .asciz "clang version 9.0.0 (trunk 354265) (llvm/trunk 354264)" # string offset=021.Linfo_string1:22 .asciz "dbg.g.c" # string offset=5523.Linfo_string2:24 .asciz "/tmp" # string offset=6325.Linfo_string3:26 .asciz "global" # string offset=6827.Linfo_string4:28 .asciz "int" # string offset=7529.Linfo_string5:30 .asciz "DW_ATE_signed_32" # string offset=7931.Linfo_string6:32 .asciz "DW_ATE_signed_8" # string offset=9633 .section .debug_abbrev,"",@progbits34 .byte 1 # Abbreviation Code35 .byte 17 # DW_TAG_compile_unit36 .byte 1 # DW_CHILDREN_yes37 .byte 37 # DW_AT_producer38 .byte 14 # DW_FORM_strp39 .byte 19 # DW_AT_language40 .byte 5 # DW_FORM_data241 .byte 3 # DW_AT_name42 .byte 14 # DW_FORM_strp43 .byte 16 # DW_AT_stmt_list44 .byte 23 # DW_FORM_sec_offset45 .byte 27 # DW_AT_comp_dir46 .byte 14 # DW_FORM_strp47 .byte 0 # EOM(1)48 .byte 0 # EOM(2)49 .byte 2 # Abbreviation Code50 .byte 36 # DW_TAG_base_type51 .byte 0 # DW_CHILDREN_no52 .byte 3 # DW_AT_name53 .byte 14 # DW_FORM_strp54 .byte 62 # DW_AT_encoding55 .byte 11 # DW_FORM_data156 .byte 11 # DW_AT_byte_size57 .byte 11 # DW_FORM_data158 .byte 0 # EOM(1)59 .byte 0 # EOM(2)60 .byte 3 # Abbreviation Code61 .byte 52 # DW_TAG_variable62 .byte 0 # DW_CHILDREN_no63 .byte 3 # DW_AT_name64 .byte 14 # DW_FORM_strp65 .byte 73 # DW_AT_type66 .byte 19 # DW_FORM_ref467 .byte 63 # DW_AT_external68 .byte 25 # DW_FORM_flag_present69 .byte 58 # DW_AT_decl_file70 .byte 11 # DW_FORM_data171 .byte 59 # DW_AT_decl_line72 .byte 11 # DW_FORM_data173 .byte 2 # DW_AT_location74 .byte 24 # DW_FORM_exprloc75 .byte 0 # EOM(1)76 .byte 0 # EOM(2)77 .byte 0 # EOM(3)78 .section .debug_info,"",@progbits79.Lcu_begin0:80 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit81.Ldebug_info_start0:82 .short 4 # DWARF version number83 .long .debug_abbrev # Offset Into Abbrev. Section84 .byte 8 # Address Size (in bytes)85 .byte 1 # Abbrev [1] 0xb:0x48 DW_TAG_compile_unit86 .long .Linfo_string0 # DW_AT_producer87 .short 12 # DW_AT_language88 .long .Linfo_string1 # DW_AT_name89 .long .Lline_table_start0 # DW_AT_stmt_list90 .long .Linfo_string2 # DW_AT_comp_dir91 .byte 2 # Abbrev [2] 0x1e:0x7 DW_TAG_base_type92 .long .Linfo_string6 # DW_AT_name93 .byte 5 # DW_AT_encoding94 .byte 1 # DW_AT_byte_size95 .byte 2 # Abbrev [2] 0x25:0x7 DW_TAG_base_type96 .long .Linfo_string5 # DW_AT_name97 .byte 5 # DW_AT_encoding98 .byte 4 # DW_AT_byte_size99 .byte 3 # Abbrev [3] 0x2c:0x1f DW_TAG_variable100 .long .Linfo_string3 # DW_AT_name101 .long 75 # DW_AT_type102 # DW_AT_external103 .byte 1 # DW_AT_decl_file104 .byte 1 # DW_AT_decl_line105 .byte 19 # DW_AT_location106 .byte 3107 .quad global108 .byte 168109 .asciz "\235\200\200" ### This offset is off by one to test the invalid base_type ref printout110 .byte 168111 .asciz "\245\200\200"112 .byte 2 # Abbrev [2] 0x4b:0x7 DW_TAG_base_type113 .long .Linfo_string4 # DW_AT_name114 .byte 5 # DW_AT_encoding115 .byte 4 # DW_AT_byte_size116 .byte 0 # End Of Children Mark117.Ldebug_info_end0:118 .section .debug_macinfo,"",@progbits119 .byte 0 # End Of Macro List Mark120 121 .ident "clang version 9.0.0 (trunk 354265) (llvm/trunk 354264)"122 .section ".note.GNU-stack","",@progbits123 .section .debug_line,"",@progbits124.Lline_table_start0:125