163 lines · plain
1# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \2# RUN: llvm-dwarfdump -find=foobar - | FileCheck %s3 4# CHECK: DW_TAG_variable5# CHECK-NEXT: DW_AT_name ("foobar")6 7 .text8 .file "<stdin>"9 .file 1 "/tmp/cu1.c"10 .type foobar,@object # @foobar11 .comm foobar,8,812 .section .debug_str,"MS",@progbits,113.Lskel_string0:14 .asciz "foo.dwo" # string offset=015.Lskel_string1:16 .asciz "/tmp" # string offset=817.Lskel_string2:18 .asciz "foobar" # string offset=1319 .section .debug_loc.dwo,"e",@progbits20 .section .debug_abbrev,"",@progbits21 .byte 1 # Abbreviation Code22 .byte 17 # DW_TAG_compile_unit23 .byte 0 # DW_CHILDREN_no24 .byte 16 # DW_AT_stmt_list25 .byte 23 # DW_FORM_sec_offset26 .ascii "\260B" # DW_AT_GNU_dwo_name27 .byte 14 # DW_FORM_strp28 .byte 27 # DW_AT_comp_dir29 .byte 14 # DW_FORM_strp30 .ascii "\261B" # DW_AT_GNU_dwo_id31 .byte 7 # DW_FORM_data832 .ascii "\263B" # DW_AT_GNU_addr_base33 .byte 23 # DW_FORM_sec_offset34 .byte 0 # EOM(1)35 .byte 0 # EOM(2)36 .byte 0 # EOM(3)37 .section .debug_info,"",@progbits38.Lcu_begin0:39 .long 32 # Length of Unit40 .short 4 # DWARF version number41 .long .debug_abbrev # Offset Into Abbrev. Section42 .byte 8 # Address Size (in bytes)43 .byte 1 # Abbrev [1] 0xb:0x19 DW_TAG_compile_unit44 .long 0 # DW_AT_stmt_list45 .long .Lskel_string0 # DW_AT_GNU_dwo_name46 .long .Lskel_string1 # DW_AT_comp_dir47 .quad -1328675031687321003 # DW_AT_GNU_dwo_id48 .long .debug_addr # DW_AT_GNU_addr_base49 .section .debug_ranges,"",@progbits50 .section .debug_macinfo,"",@progbits51 .byte 0 # End Of Macro List Mark52 .section .debug_str.dwo,"MSe",@progbits,153.Linfo_string0:54 .asciz "foo.dwo" # string offset=055.Linfo_string1:56 .asciz "clang version 7.0.0 (trunk 325496) (llvm/trunk 325732)" # string offset=857.Linfo_string2:58 .asciz "/tmp/cu1.c" # string offset=6359.Linfo_string3:60 .asciz "foobar" # string offset=7461 .section .debug_str_offsets.dwo,"e",@progbits62 .long 063 .long 864 .long 6365 .long 7466 .section .debug_info.dwo,"e",@progbits67 .long 34 # Length of Unit68 .short 4 # DWARF version number69 .long 0 # Offset Into Abbrev. Section70 .byte 8 # Address Size (in bytes)71 .byte 1 # Abbrev [1] 0xb:0x1b DW_TAG_compile_unit72 .byte 0 # DW_AT_GNU_dwo_name73 .byte 1 # DW_AT_producer74 .short 12 # DW_AT_language75 .byte 2 # DW_AT_name76 .quad -1328675031687321003 # DW_AT_GNU_dwo_id77 .byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable78 .byte 3 # DW_AT_name79 .long 36 # DW_AT_type80 # DW_AT_external81 .byte 1 # DW_AT_decl_file82 .byte 1 # DW_AT_decl_line83 .byte 2 # DW_AT_location84 .byte 25185 .byte 086 .byte 3 # Abbrev [3] 0x24:0x1 DW_TAG_pointer_type87 .byte 0 # End Of Children Mark88 .section .debug_abbrev.dwo,"e",@progbits89 .byte 1 # Abbreviation Code90 .byte 17 # DW_TAG_compile_unit91 .byte 1 # DW_CHILDREN_yes92 .ascii "\260B" # DW_AT_GNU_dwo_name93 .ascii "\202>" # DW_FORM_GNU_str_index94 .byte 37 # DW_AT_producer95 .ascii "\202>" # DW_FORM_GNU_str_index96 .byte 19 # DW_AT_language97 .byte 5 # DW_FORM_data298 .byte 3 # DW_AT_name99 .ascii "\202>" # DW_FORM_GNU_str_index100 .ascii "\261B" # DW_AT_GNU_dwo_id101 .byte 7 # DW_FORM_data8102 .byte 0 # EOM(1)103 .byte 0 # EOM(2)104 .byte 2 # Abbreviation Code105 .byte 52 # DW_TAG_variable106 .byte 0 # DW_CHILDREN_no107 .byte 3 # DW_AT_name108 .ascii "\202>" # DW_FORM_GNU_str_index109 .byte 73 # DW_AT_type110 .byte 19 # DW_FORM_ref4111 .byte 63 # DW_AT_external112 .byte 25 # DW_FORM_flag_present113 .byte 58 # DW_AT_decl_file114 .byte 11 # DW_FORM_data1115 .byte 59 # DW_AT_decl_line116 .byte 11 # DW_FORM_data1117 .byte 2 # DW_AT_location118 .byte 24 # DW_FORM_exprloc119 .byte 0 # EOM(1)120 .byte 0 # EOM(2)121 .byte 3 # Abbreviation Code122 .byte 15 # DW_TAG_pointer_type123 .byte 0 # DW_CHILDREN_no124 .byte 0 # EOM(1)125 .byte 0 # EOM(2)126 .byte 0 # EOM(3)127 .section .debug_addr,"",@progbits128 .quad foobar129 .section .debug_names,"",@progbits130 .long .Lnames_end0-.Lnames_start0 # Header: unit length131.Lnames_start0:132 .short 5 # Header: version133 .short 0 # Header: padding134 .long 1 # Header: compilation unit count135 .long 0 # Header: local type unit count136 .long 0 # Header: foreign type unit count137 .long 1 # Header: bucket count138 .long 1 # Header: name count139 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size140 .long 8 # Header: augmentation string size141 .ascii "LLVM0700" # Header: augmentation string142 .long .Lcu_begin0 # Compilation unit 0143 .long 1 # Bucket 0144 .long -35364674 # Hash in Bucket 0145 .long .Lskel_string2 # String in Bucket 0: foobar146 .long .Lnames0-.Lnames_entries0 # Offset in Bucket 0147.Lnames_abbrev_start0:148 .byte 52 # Abbrev code149 .byte 52 # DW_TAG_variable150 .byte 3 # DW_IDX_die_offset151 .byte 19 # DW_FORM_ref4152 .byte 0 # End of abbrev153 .byte 0 # End of abbrev154 .byte 0 # End of abbrev list155.Lnames_abbrev_end0:156.Lnames_entries0:157.Lnames0:158 .byte 52 # Abbreviation code159 .long 25 # DW_IDX_die_offset160 .long 0 # End of list: foobar161 .p2align 2162.Lnames_end0:163