14adc88edSPavel Labath# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \ 24adc88edSPavel Labath# RUN: llvm-dwarfdump -find=foobar - | FileCheck %s 34adc88edSPavel Labath 44adc88edSPavel Labath# CHECK: DW_TAG_variable 54adc88edSPavel Labath# CHECK-NEXT: DW_AT_name ("foobar") 64adc88edSPavel Labath 74adc88edSPavel Labath .text 84adc88edSPavel Labath .file "<stdin>" 94adc88edSPavel Labath .file 1 "/tmp/cu1.c" 104adc88edSPavel Labath .type foobar,@object # @foobar 114adc88edSPavel Labath .comm foobar,8,8 124adc88edSPavel Labath .section .debug_str,"MS",@progbits,1 134adc88edSPavel Labath.Lskel_string0: 144adc88edSPavel Labath .asciz "foo.dwo" # string offset=0 154adc88edSPavel Labath.Lskel_string1: 164adc88edSPavel Labath .asciz "/tmp" # string offset=8 174adc88edSPavel Labath.Lskel_string2: 184adc88edSPavel Labath .asciz "foobar" # string offset=13 19*d840e545SFangrui Song .section .debug_loc.dwo,"e",@progbits 204adc88edSPavel Labath .section .debug_abbrev,"",@progbits 214adc88edSPavel Labath .byte 1 # Abbreviation Code 224adc88edSPavel Labath .byte 17 # DW_TAG_compile_unit 234adc88edSPavel Labath .byte 0 # DW_CHILDREN_no 244adc88edSPavel Labath .byte 16 # DW_AT_stmt_list 254adc88edSPavel Labath .byte 23 # DW_FORM_sec_offset 264adc88edSPavel Labath .ascii "\260B" # DW_AT_GNU_dwo_name 274adc88edSPavel Labath .byte 14 # DW_FORM_strp 284adc88edSPavel Labath .byte 27 # DW_AT_comp_dir 294adc88edSPavel Labath .byte 14 # DW_FORM_strp 304adc88edSPavel Labath .ascii "\261B" # DW_AT_GNU_dwo_id 314adc88edSPavel Labath .byte 7 # DW_FORM_data8 324adc88edSPavel Labath .ascii "\263B" # DW_AT_GNU_addr_base 334adc88edSPavel Labath .byte 23 # DW_FORM_sec_offset 344adc88edSPavel Labath .byte 0 # EOM(1) 354adc88edSPavel Labath .byte 0 # EOM(2) 364adc88edSPavel Labath .byte 0 # EOM(3) 374adc88edSPavel Labath .section .debug_info,"",@progbits 384adc88edSPavel Labath.Lcu_begin0: 394adc88edSPavel Labath .long 32 # Length of Unit 404adc88edSPavel Labath .short 4 # DWARF version number 414adc88edSPavel Labath .long .debug_abbrev # Offset Into Abbrev. Section 424adc88edSPavel Labath .byte 8 # Address Size (in bytes) 434adc88edSPavel Labath .byte 1 # Abbrev [1] 0xb:0x19 DW_TAG_compile_unit 444adc88edSPavel Labath .long 0 # DW_AT_stmt_list 454adc88edSPavel Labath .long .Lskel_string0 # DW_AT_GNU_dwo_name 464adc88edSPavel Labath .long .Lskel_string1 # DW_AT_comp_dir 474adc88edSPavel Labath .quad -1328675031687321003 # DW_AT_GNU_dwo_id 484adc88edSPavel Labath .long .debug_addr # DW_AT_GNU_addr_base 494adc88edSPavel Labath .section .debug_ranges,"",@progbits 504adc88edSPavel Labath .section .debug_macinfo,"",@progbits 514adc88edSPavel Labath .byte 0 # End Of Macro List Mark 52*d840e545SFangrui Song .section .debug_str.dwo,"MSe",@progbits,1 534adc88edSPavel Labath.Linfo_string0: 544adc88edSPavel Labath .asciz "foo.dwo" # string offset=0 554adc88edSPavel Labath.Linfo_string1: 564adc88edSPavel Labath .asciz "clang version 7.0.0 (trunk 325496) (llvm/trunk 325732)" # string offset=8 574adc88edSPavel Labath.Linfo_string2: 584adc88edSPavel Labath .asciz "/tmp/cu1.c" # string offset=63 594adc88edSPavel Labath.Linfo_string3: 604adc88edSPavel Labath .asciz "foobar" # string offset=74 61*d840e545SFangrui Song .section .debug_str_offsets.dwo,"e",@progbits 624adc88edSPavel Labath .long 0 634adc88edSPavel Labath .long 8 644adc88edSPavel Labath .long 63 654adc88edSPavel Labath .long 74 66*d840e545SFangrui Song .section .debug_info.dwo,"e",@progbits 674adc88edSPavel Labath .long 34 # Length of Unit 684adc88edSPavel Labath .short 4 # DWARF version number 694adc88edSPavel Labath .long 0 # Offset Into Abbrev. Section 704adc88edSPavel Labath .byte 8 # Address Size (in bytes) 714adc88edSPavel Labath .byte 1 # Abbrev [1] 0xb:0x1b DW_TAG_compile_unit 724adc88edSPavel Labath .byte 0 # DW_AT_GNU_dwo_name 734adc88edSPavel Labath .byte 1 # DW_AT_producer 744adc88edSPavel Labath .short 12 # DW_AT_language 754adc88edSPavel Labath .byte 2 # DW_AT_name 764adc88edSPavel Labath .quad -1328675031687321003 # DW_AT_GNU_dwo_id 774adc88edSPavel Labath .byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable 784adc88edSPavel Labath .byte 3 # DW_AT_name 794adc88edSPavel Labath .long 36 # DW_AT_type 804adc88edSPavel Labath # DW_AT_external 814adc88edSPavel Labath .byte 1 # DW_AT_decl_file 824adc88edSPavel Labath .byte 1 # DW_AT_decl_line 834adc88edSPavel Labath .byte 2 # DW_AT_location 844adc88edSPavel Labath .byte 251 854adc88edSPavel Labath .byte 0 864adc88edSPavel Labath .byte 3 # Abbrev [3] 0x24:0x1 DW_TAG_pointer_type 874adc88edSPavel Labath .byte 0 # End Of Children Mark 88*d840e545SFangrui Song .section .debug_abbrev.dwo,"e",@progbits 894adc88edSPavel Labath .byte 1 # Abbreviation Code 904adc88edSPavel Labath .byte 17 # DW_TAG_compile_unit 914adc88edSPavel Labath .byte 1 # DW_CHILDREN_yes 924adc88edSPavel Labath .ascii "\260B" # DW_AT_GNU_dwo_name 934adc88edSPavel Labath .ascii "\202>" # DW_FORM_GNU_str_index 944adc88edSPavel Labath .byte 37 # DW_AT_producer 954adc88edSPavel Labath .ascii "\202>" # DW_FORM_GNU_str_index 964adc88edSPavel Labath .byte 19 # DW_AT_language 974adc88edSPavel Labath .byte 5 # DW_FORM_data2 984adc88edSPavel Labath .byte 3 # DW_AT_name 994adc88edSPavel Labath .ascii "\202>" # DW_FORM_GNU_str_index 1004adc88edSPavel Labath .ascii "\261B" # DW_AT_GNU_dwo_id 1014adc88edSPavel Labath .byte 7 # DW_FORM_data8 1024adc88edSPavel Labath .byte 0 # EOM(1) 1034adc88edSPavel Labath .byte 0 # EOM(2) 1044adc88edSPavel Labath .byte 2 # Abbreviation Code 1054adc88edSPavel Labath .byte 52 # DW_TAG_variable 1064adc88edSPavel Labath .byte 0 # DW_CHILDREN_no 1074adc88edSPavel Labath .byte 3 # DW_AT_name 1084adc88edSPavel Labath .ascii "\202>" # DW_FORM_GNU_str_index 1094adc88edSPavel Labath .byte 73 # DW_AT_type 1104adc88edSPavel Labath .byte 19 # DW_FORM_ref4 1114adc88edSPavel Labath .byte 63 # DW_AT_external 1124adc88edSPavel Labath .byte 25 # DW_FORM_flag_present 1134adc88edSPavel Labath .byte 58 # DW_AT_decl_file 1144adc88edSPavel Labath .byte 11 # DW_FORM_data1 1154adc88edSPavel Labath .byte 59 # DW_AT_decl_line 1164adc88edSPavel Labath .byte 11 # DW_FORM_data1 1174adc88edSPavel Labath .byte 2 # DW_AT_location 1184adc88edSPavel Labath .byte 24 # DW_FORM_exprloc 1194adc88edSPavel Labath .byte 0 # EOM(1) 1204adc88edSPavel Labath .byte 0 # EOM(2) 1214adc88edSPavel Labath .byte 3 # Abbreviation Code 1224adc88edSPavel Labath .byte 15 # DW_TAG_pointer_type 1234adc88edSPavel Labath .byte 0 # DW_CHILDREN_no 1244adc88edSPavel Labath .byte 0 # EOM(1) 1254adc88edSPavel Labath .byte 0 # EOM(2) 1264adc88edSPavel Labath .byte 0 # EOM(3) 1274adc88edSPavel Labath .section .debug_addr,"",@progbits 1284adc88edSPavel Labath .quad foobar 1294adc88edSPavel Labath .section .debug_names,"",@progbits 1304adc88edSPavel Labath .long .Lnames_end0-.Lnames_start0 # Header: unit length 1314adc88edSPavel Labath.Lnames_start0: 1324adc88edSPavel Labath .short 5 # Header: version 1334adc88edSPavel Labath .short 0 # Header: padding 1344adc88edSPavel Labath .long 1 # Header: compilation unit count 1354adc88edSPavel Labath .long 0 # Header: local type unit count 1364adc88edSPavel Labath .long 0 # Header: foreign type unit count 1374adc88edSPavel Labath .long 1 # Header: bucket count 1384adc88edSPavel Labath .long 1 # Header: name count 1394adc88edSPavel Labath .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size 1404adc88edSPavel Labath .long 8 # Header: augmentation string size 1414adc88edSPavel Labath .ascii "LLVM0700" # Header: augmentation string 1424adc88edSPavel Labath .long .Lcu_begin0 # Compilation unit 0 1434adc88edSPavel Labath .long 1 # Bucket 0 1444adc88edSPavel Labath .long -35364674 # Hash in Bucket 0 1454adc88edSPavel Labath .long .Lskel_string2 # String in Bucket 0: foobar 1464adc88edSPavel Labath .long .Lnames0-.Lnames_entries0 # Offset in Bucket 0 1474adc88edSPavel Labath.Lnames_abbrev_start0: 1484adc88edSPavel Labath .byte 52 # Abbrev code 1494adc88edSPavel Labath .byte 52 # DW_TAG_variable 1504adc88edSPavel Labath .byte 3 # DW_IDX_die_offset 1514adc88edSPavel Labath .byte 19 # DW_FORM_ref4 1524adc88edSPavel Labath .byte 0 # End of abbrev 1534adc88edSPavel Labath .byte 0 # End of abbrev 1544adc88edSPavel Labath .byte 0 # End of abbrev list 1554adc88edSPavel Labath.Lnames_abbrev_end0: 1564adc88edSPavel Labath.Lnames_entries0: 1574adc88edSPavel Labath.Lnames0: 1584adc88edSPavel Labath .byte 52 # Abbreviation code 1594adc88edSPavel Labath .long 25 # DW_IDX_die_offset 1604adc88edSPavel Labath .long 0 # End of list: foobar 1614adc88edSPavel Labath .p2align 2 1624adc88edSPavel Labath.Lnames_end0: 163