1# RUN: rm -rf %t 2# RUN: mkdir %t 3# RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=4 %s -o %t/test.o -split-dwarf-file %t/test.dwo 4# RUN: cd %t 5# RUN: llvm-symbolizer --verbose 0x0 --obj=test.o | FileCheck --check-prefix=SYM %s 6# RUN: llvm-dwarfdump -lookup=0x1 test.o | FileCheck --check-prefix=LOOKUP %s 7 8# SYM: Filename: .{{[/\\]}}test.c 9# SYM: Function start filename: .{{[/\\]}}test.c 10 11# LOOKUP: Line info: line 0, column 0, start file 'test.c', start line 1 12 13 .text 14 .file "test.c" 15 .globl f1 # -- Begin function f1 16 .p2align 4, 0x90 17 .type f1,@function 18f1: # @f1 19.Lfunc_begin0: 20 .file 0 "./" "test.c" md5 0xde4c8c8bd673cd6151beb4570168727a 21 .loc 0 1 0 # test.c:1:0 22 .cfi_startproc 23# %bb.0: # %entry 24 pushq %rbp 25 .cfi_def_cfa_offset 16 26 .cfi_offset %rbp, -16 27 movq %rsp, %rbp 28 .cfi_def_cfa_register %rbp 29.Ltmp0: 30 .loc 0 1 13 prologue_end # test.c:1:13 31 popq %rbp 32 .cfi_def_cfa %rsp, 8 33 retq 34.Ltmp1: 35.Lfunc_end0: 36 .size f1, .Lfunc_end0-f1 37 .cfi_endproc 38 # -- End function 39 .section .debug_abbrev,"",@progbits 40 .byte 1 # Abbreviation Code 41 .byte 74 # DW_TAG_skeleton_unit 42 .byte 0 # DW_CHILDREN_no 43 .byte 16 # DW_AT_stmt_list 44 .byte 23 # DW_FORM_sec_offset 45 .byte 114 # DW_AT_str_offsets_base 46 .byte 23 # DW_FORM_sec_offset 47 .byte 27 # DW_AT_comp_dir 48 .byte 37 # DW_FORM_strx1 49 .ascii "\264B" # DW_AT_GNU_pubnames 50 .byte 25 # DW_FORM_flag_present 51 .byte 118 # DW_AT_dwo_name 52 .byte 37 # DW_FORM_strx1 53 .byte 17 # DW_AT_low_pc 54 .byte 27 # DW_FORM_addrx 55 .byte 18 # DW_AT_high_pc 56 .byte 6 # DW_FORM_data4 57 .byte 115 # DW_AT_addr_base 58 .byte 23 # DW_FORM_sec_offset 59 .byte 0 # EOM(1) 60 .byte 0 # EOM(2) 61 .byte 0 # EOM(3) 62 .section .debug_info,"",@progbits 63.Lcu_begin0: 64 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 65.Ldebug_info_start0: 66 .short 5 # DWARF version number 67 .byte 4 # DWARF Unit Type 68 .byte 8 # Address Size (in bytes) 69 .long .debug_abbrev # Offset Into Abbrev. Section 70 .quad -2320906069171721424 71 .byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit 72 .long .Lline_table_start0 # DW_AT_stmt_list 73 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base 74 .byte 0 # DW_AT_comp_dir 75 # DW_AT_GNU_pubnames 76 .byte 1 # DW_AT_dwo_name 77 .byte 0 # DW_AT_low_pc 78 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 79 .long .Laddr_table_base0 # DW_AT_addr_base 80.Ldebug_info_end0: 81 .section .debug_str_offsets,"",@progbits 82 .long 12 # Length of String Offsets Set 83 .short 5 84 .short 0 85.Lstr_offsets_base0: 86 .section .debug_str,"MS",@progbits,1 87.Lskel_string0: 88 .asciz "./" # string offset=0 89.Lskel_string1: 90 .asciz "./test.dwo" # string offset=3 91 .section .debug_str_offsets,"",@progbits 92 .long .Lskel_string0 93 .long .Lskel_string1 94 .section .debug_str_offsets.dwo,"e",@progbits 95 .long 20 # Length of String Offsets Set 96 .short 5 97 .short 0 98 .section .debug_str.dwo,"eMS",@progbits,1 99.Linfo_string0: 100 .asciz "f1" # string offset=0 101.Linfo_string1: 102 .asciz "clang version 14.0.0 ([email protected]:llvm/llvm-project.git e7fdff403e849b18d93cd4a5cb760cba66a92c0b)" # string offset=3 103.Linfo_string2: 104 .asciz "test.c" # string offset=104 105.Linfo_string3: 106 .asciz "./test.dwo" # string offset=111 107 .section .debug_str_offsets.dwo,"e",@progbits 108 .long 0 109 .long 3 110 .long 104 111 .long 111 112 .section .debug_info.dwo,"e",@progbits 113 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit 114.Ldebug_info_dwo_start0: 115 .short 5 # DWARF version number 116 .byte 5 # DWARF Unit Type 117 .byte 8 # Address Size (in bytes) 118 .long 0 # Offset Into Abbrev. Section 119 .quad -2320906069171721424 120 .byte 1 # Abbrev [1] 0x14:0x12 DW_TAG_compile_unit 121 .byte 1 # DW_AT_producer 122 .short 12 # DW_AT_language 123 .byte 2 # DW_AT_name 124 .byte 3 # DW_AT_dwo_name 125 .byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_subprogram 126 .byte 0 # DW_AT_low_pc 127 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 128 .byte 1 # DW_AT_frame_base 129 .byte 86 130 .byte 0 # DW_AT_name 131 .byte 0 # DW_AT_decl_file 132 .byte 1 # DW_AT_decl_line 133 # DW_AT_external 134 .byte 0 # End Of Children Mark 135.Ldebug_info_dwo_end0: 136 .section .debug_abbrev.dwo,"e",@progbits 137 .byte 1 # Abbreviation Code 138 .byte 17 # DW_TAG_compile_unit 139 .byte 1 # DW_CHILDREN_yes 140 .byte 37 # DW_AT_producer 141 .byte 37 # DW_FORM_strx1 142 .byte 19 # DW_AT_language 143 .byte 5 # DW_FORM_data2 144 .byte 3 # DW_AT_name 145 .byte 37 # DW_FORM_strx1 146 .byte 118 # DW_AT_dwo_name 147 .byte 37 # DW_FORM_strx1 148 .byte 0 # EOM(1) 149 .byte 0 # EOM(2) 150 .byte 2 # Abbreviation Code 151 .byte 46 # DW_TAG_subprogram 152 .byte 0 # DW_CHILDREN_no 153 .byte 17 # DW_AT_low_pc 154 .byte 27 # DW_FORM_addrx 155 .byte 18 # DW_AT_high_pc 156 .byte 6 # DW_FORM_data4 157 .byte 64 # DW_AT_frame_base 158 .byte 24 # DW_FORM_exprloc 159 .byte 3 # DW_AT_name 160 .byte 37 # DW_FORM_strx1 161 .byte 58 # DW_AT_decl_file 162 .byte 11 # DW_FORM_data1 163 .byte 59 # DW_AT_decl_line 164 .byte 11 # DW_FORM_data1 165 .byte 63 # DW_AT_external 166 .byte 25 # DW_FORM_flag_present 167 .byte 0 # EOM(1) 168 .byte 0 # EOM(2) 169 .byte 0 # EOM(3) 170 .section .debug_addr,"",@progbits 171 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 172.Ldebug_addr_start0: 173 .short 5 # DWARF version number 174 .byte 8 # Address size 175 .byte 0 # Segment selector size 176.Laddr_table_base0: 177 .quad .Lfunc_begin0 178.Ldebug_addr_end0: 179 .section .debug_gnu_pubnames,"",@progbits 180 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info 181.LpubNames_start0: 182 .short 2 # DWARF Version 183 .long .Lcu_begin0 # Offset of Compilation Unit Info 184 .long 40 # Compilation Unit Length 185 .long 26 # DIE offset 186 .byte 48 # Attributes: FUNCTION, EXTERNAL 187 .asciz "f1" # External Name 188 .long 0 # End Mark 189.LpubNames_end0: 190 .section .debug_gnu_pubtypes,"",@progbits 191 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info 192.LpubTypes_start0: 193 .short 2 # DWARF Version 194 .long .Lcu_begin0 # Offset of Compilation Unit Info 195 .long 40 # Compilation Unit Length 196 .long 0 # End Mark 197.LpubTypes_end0: 198 .ident "clang version 14.0.0 ([email protected]:llvm/llvm-project.git e7fdff403e849b18d93cd4a5cb760cba66a92c0b)" 199 .section ".note.GNU-stack","",@progbits 200 .addrsig 201 .section .debug_line,"",@progbits 202.Lline_table_start0: 203