354 lines · plain
1# REQUIRES: x86-registered-target2 3# RUN: rm -rf %t4# RUN: mkdir -p %t5# RUN: llvm-mc --triple x86_64 %s -o %t/test.o -filetype=obj6# RUN: cd %t7 8# RUN: llvm-symbolizer -e test.o 0x30 | FileCheck %s9 10# CHECK: f1()11# CHECK: .{{/|\\}}test.cpp:6:312# CHECK: main13# CHECK: .{{/|\\}}test.cpp:7:314 15 16 .text17 .zero 4218 .file "test.cpp"19 .file 0 "./" "test.cpp" md5 0x03b7c6de668697331888d80c6ad0d69e20 .globl main # -- Begin function main21 .p2align 4, 0x9022 .type main,@function23main: # @main24.Lfunc_begin0:25 .cfi_startproc26# %bb.0: # %entry27 .loc 0 6 3 prologue_end # test.cpp:6:328 incl i(%rip)29.Ltmp0:30 .loc 0 3 3 # test.cpp:3:331 incl i(%rip)32.Ltmp1:33 .loc 0 8 1 # test.cpp:8:134 xorl %eax, %eax35 retq36.Ltmp2:37.Lfunc_end0:38 .size main, .Lfunc_end0-main39 .cfi_endproc40 # -- End function41 .type i,@object # @i42 .bss43 .globl i44 .p2align 2, 0x045i:46 .long 0 # 0x047 .size i, 448 49 .section .debug_abbrev,"",@progbits50 .byte 1 # Abbreviation Code51 .byte 74 # DW_TAG_skeleton_unit52 .byte 0 # DW_CHILDREN_no53 .byte 16 # DW_AT_stmt_list54 .byte 23 # DW_FORM_sec_offset55 .byte 114 # DW_AT_str_offsets_base56 .byte 23 # DW_FORM_sec_offset57 .byte 27 # DW_AT_comp_dir58 .byte 37 # DW_FORM_strx159 .ascii "\264B" # DW_AT_GNU_pubnames60 .byte 25 # DW_FORM_flag_present61 .byte 118 # DW_AT_dwo_name62 .byte 37 # DW_FORM_strx163 .byte 17 # DW_AT_low_pc64 .byte 27 # DW_FORM_addrx65 .byte 18 # DW_AT_high_pc66 .byte 6 # DW_FORM_data467 .byte 115 # DW_AT_addr_base68 .byte 23 # DW_FORM_sec_offset69 .byte 0 # EOM(1)70 .byte 0 # EOM(2)71 .byte 0 # EOM(3)72 .section .debug_info,"",@progbits73.Lcu_begin0:74 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit75.Ldebug_info_start0:76 .short 5 # DWARF version number77 .byte 4 # DWARF Unit Type78 .byte 8 # Address Size (in bytes)79 .long .debug_abbrev # Offset Into Abbrev. Section80 .quad 642766774665596650681 .byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit82 .long .Lline_table_start0 # DW_AT_stmt_list83 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base84 .byte 0 # DW_AT_comp_dir85 # DW_AT_GNU_pubnames86 .byte 1 # DW_AT_dwo_name87 .byte 1 # DW_AT_low_pc88 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc89 .long .Laddr_table_base0 # DW_AT_addr_base90.Ldebug_info_end0:91 .section .debug_str_offsets,"",@progbits92 .long 12 # Length of String Offsets Set93 .short 594 .short 095.Lstr_offsets_base0:96 .section .debug_str,"MS",@progbits,197.Lskel_string0:98 .asciz "." # string offset=099.Lskel_string1:100 .asciz "test.o" # string offset=43101 .section .debug_str_offsets,"",@progbits102 .long .Lskel_string0103 .long .Lskel_string1104 .section .debug_str_offsets.dwo,"e",@progbits105 .long 36 # Length of String Offsets Set106 .short 5107 .short 0108 .section .debug_str.dwo,"eMS",@progbits,1109.Linfo_string0:110 .asciz "i" # string offset=0111.Linfo_string1:112 .asciz "int" # string offset=2113.Linfo_string2:114 .asciz "_Z2f1v" # string offset=6115.Linfo_string3:116 .asciz "f1" # string offset=13117.Linfo_string4:118 .asciz "main" # string offset=16119.Linfo_string5:120 .asciz "clang version 17.0.0 (git@github.com:llvm/llvm-project.git 6963c61f0f6e4be2039cb45e824ea1e83a8f1526)" # string offset=21121.Linfo_string6:122 .asciz "test.cpp" # string offset=122123.Linfo_string7:124 .asciz "test.o" # string offset=131125 .section .debug_str_offsets.dwo,"e",@progbits126 .long 0127 .long 2128 .long 6129 .long 13130 .long 16131 .long 21132 .long 122133 .long 131134 .section .debug_info.dwo,"e",@progbits135 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit136.Ldebug_info_dwo_start0:137 .short 5 # DWARF version number138 .byte 5 # DWARF Unit Type139 .byte 8 # Address Size (in bytes)140 .long 0 # Offset Into Abbrev. Section141 .quad 6427667746655966506142 .byte 1 # Abbrev [1] 0x14:0x39 DW_TAG_compile_unit143 .byte 5 # DW_AT_producer144 .short 33 # DW_AT_language145 .byte 6 # DW_AT_name146 .byte 7 # DW_AT_dwo_name147 .byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable148 .byte 0 # DW_AT_name149 .long 37 # DW_AT_type150 # DW_AT_external151 .byte 0 # DW_AT_decl_file152 .byte 1 # DW_AT_decl_line153 .byte 2 # DW_AT_location154 .byte 161155 .byte 0156 .byte 3 # Abbrev [3] 0x25:0x5 DW_TAG_volatile_type157 .long 42 # DW_AT_type158 .byte 4 # Abbrev [4] 0x2a:0x4 DW_TAG_base_type159 .byte 1 # DW_AT_name160 .byte 5 # DW_AT_encoding161 .byte 4 # DW_AT_byte_size162 .byte 5 # Abbrev [5] 0x2e:0x5 DW_TAG_subprogram163 .byte 2 # DW_AT_linkage_name164 .byte 3 # DW_AT_name165 .byte 0 # DW_AT_decl_file166 .byte 2 # DW_AT_decl_line167 # DW_AT_external168 # DW_AT_inline169 .byte 6 # Abbrev [6] 0x33:0x19 DW_TAG_subprogram170 .byte 1 # DW_AT_low_pc171 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc172 .byte 1 # DW_AT_frame_base173 .byte 87174 # DW_AT_call_all_calls175 .byte 4 # DW_AT_name176 .byte 0 # DW_AT_decl_file177 .byte 5 # DW_AT_decl_line178 .long 42 # DW_AT_type179 # DW_AT_external180 .byte 7 # Abbrev [7] 0x42:0x9 DW_TAG_inlined_subroutine181 .long 46 # DW_AT_abstract_origin182 .byte 0 # DW_AT_ranges183 .byte 0 # DW_AT_call_file184 .byte 7 # DW_AT_call_line185 .byte 3 # DW_AT_call_column186 .byte 0 # End Of Children Mark187 .byte 0 # End Of Children Mark188.Ldebug_info_dwo_end0:189 .section .debug_abbrev.dwo,"e",@progbits190 .byte 1 # Abbreviation Code191 .byte 17 # DW_TAG_compile_unit192 .byte 1 # DW_CHILDREN_yes193 .byte 37 # DW_AT_producer194 .byte 37 # DW_FORM_strx1195 .byte 19 # DW_AT_language196 .byte 5 # DW_FORM_data2197 .byte 3 # DW_AT_name198 .byte 37 # DW_FORM_strx1199 .byte 118 # DW_AT_dwo_name200 .byte 37 # DW_FORM_strx1201 .byte 0 # EOM(1)202 .byte 0 # EOM(2)203 .byte 2 # Abbreviation Code204 .byte 52 # DW_TAG_variable205 .byte 0 # DW_CHILDREN_no206 .byte 3 # DW_AT_name207 .byte 37 # DW_FORM_strx1208 .byte 73 # DW_AT_type209 .byte 19 # DW_FORM_ref4210 .byte 63 # DW_AT_external211 .byte 25 # DW_FORM_flag_present212 .byte 58 # DW_AT_decl_file213 .byte 11 # DW_FORM_data1214 .byte 59 # DW_AT_decl_line215 .byte 11 # DW_FORM_data1216 .byte 2 # DW_AT_location217 .byte 24 # DW_FORM_exprloc218 .byte 0 # EOM(1)219 .byte 0 # EOM(2)220 .byte 3 # Abbreviation Code221 .byte 53 # DW_TAG_volatile_type222 .byte 0 # DW_CHILDREN_no223 .byte 73 # DW_AT_type224 .byte 19 # DW_FORM_ref4225 .byte 0 # EOM(1)226 .byte 0 # EOM(2)227 .byte 4 # Abbreviation Code228 .byte 36 # DW_TAG_base_type229 .byte 0 # DW_CHILDREN_no230 .byte 3 # DW_AT_name231 .byte 37 # DW_FORM_strx1232 .byte 62 # DW_AT_encoding233 .byte 11 # DW_FORM_data1234 .byte 11 # DW_AT_byte_size235 .byte 11 # DW_FORM_data1236 .byte 0 # EOM(1)237 .byte 0 # EOM(2)238 .byte 5 # Abbreviation Code239 .byte 46 # DW_TAG_subprogram240 .byte 0 # DW_CHILDREN_no241 .byte 110 # DW_AT_linkage_name242 .byte 37 # DW_FORM_strx1243 .byte 3 # DW_AT_name244 .byte 37 # DW_FORM_strx1245 .byte 58 # DW_AT_decl_file246 .byte 11 # DW_FORM_data1247 .byte 59 # DW_AT_decl_line248 .byte 11 # DW_FORM_data1249 .byte 63 # DW_AT_external250 .byte 25 # DW_FORM_flag_present251 .byte 32 # DW_AT_inline252 .byte 33 # DW_FORM_implicit_const253 .byte 1254 .byte 0 # EOM(1)255 .byte 0 # EOM(2)256 .byte 6 # Abbreviation Code257 .byte 46 # DW_TAG_subprogram258 .byte 1 # DW_CHILDREN_yes259 .byte 17 # DW_AT_low_pc260 .byte 27 # DW_FORM_addrx261 .byte 18 # DW_AT_high_pc262 .byte 6 # DW_FORM_data4263 .byte 64 # DW_AT_frame_base264 .byte 24 # DW_FORM_exprloc265 .byte 122 # DW_AT_call_all_calls266 .byte 25 # DW_FORM_flag_present267 .byte 3 # DW_AT_name268 .byte 37 # DW_FORM_strx1269 .byte 58 # DW_AT_decl_file270 .byte 11 # DW_FORM_data1271 .byte 59 # DW_AT_decl_line272 .byte 11 # DW_FORM_data1273 .byte 73 # DW_AT_type274 .byte 19 # DW_FORM_ref4275 .byte 63 # DW_AT_external276 .byte 25 # DW_FORM_flag_present277 .byte 0 # EOM(1)278 .byte 0 # EOM(2)279 .byte 7 # Abbreviation Code280 .byte 29 # DW_TAG_inlined_subroutine281 .byte 0 # DW_CHILDREN_no282 .byte 49 # DW_AT_abstract_origin283 .byte 19 # DW_FORM_ref4284 .byte 85 # DW_AT_ranges285 .byte 35 # DW_FORM_rnglistx286 .byte 88 # DW_AT_call_file287 .byte 11 # DW_FORM_data1288 .byte 89 # DW_AT_call_line289 .byte 11 # DW_FORM_data1290 .byte 87 # DW_AT_call_column291 .byte 11 # DW_FORM_data1292 .byte 0 # EOM(1)293 .byte 0 # EOM(2)294 .byte 0 # EOM(3)295 .section .debug_rnglists.dwo,"e",@progbits296 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length297.Ldebug_list_header_start0:298 .short 5 # Version299 .byte 8 # Address size300 .byte 0 # Segment selector size301 .long 1 # Offset entry count302.Lrnglists_dwo_table_base0:303 .long .Ldebug_ranges0-.Lrnglists_dwo_table_base0304.Ldebug_ranges0:305 .byte 4 # DW_RLE_offset_pair306 .uleb128 .Ltmp0-.Lfunc_begin0 # starting offset307 .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset308 .byte 0 # DW_RLE_end_of_list309.Ldebug_list_header_end0:310 .section .debug_addr,"",@progbits311 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution312.Ldebug_addr_start0:313 .short 5 # DWARF version number314 .byte 8 # Address size315 .byte 0 # Segment selector size316.Laddr_table_base0:317 .quad i318 .quad 42319.Ldebug_addr_end0:320 .section .debug_gnu_pubnames,"",@progbits321 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info322.LpubNames_start0:323 .short 2 # DWARF Version324 .long .Lcu_begin0 # Offset of Compilation Unit Info325 .long 40 # Compilation Unit Length326 .long 46 # DIE offset327 .byte 48 # Attributes: FUNCTION, EXTERNAL328 .asciz "f1" # External Name329 .long 26 # DIE offset330 .byte 32 # Attributes: VARIABLE, EXTERNAL331 .asciz "i" # External Name332 .long 51 # DIE offset333 .byte 48 # Attributes: FUNCTION, EXTERNAL334 .asciz "main" # External Name335 .long 0 # End Mark336.LpubNames_end0:337 .section .debug_gnu_pubtypes,"",@progbits338 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info339.LpubTypes_start0:340 .short 2 # DWARF Version341 .long .Lcu_begin0 # Offset of Compilation Unit Info342 .long 40 # Compilation Unit Length343 .long 42 # DIE offset344 .byte 144 # Attributes: TYPE, STATIC345 .asciz "int" # External Name346 .long 0 # End Mark347.LpubTypes_end0:348 .ident "clang version 17.0.0 (git@github.com:llvm/llvm-project.git 6963c61f0f6e4be2039cb45e824ea1e83a8f1526)"349 .section ".note.GNU-stack","",@progbits350 .addrsig351 .addrsig_sym i352 .section .debug_line,"",@progbits353.Lline_table_start0:354