212 lines · plain
1# RUN: rm -rf %t2# RUN: mkdir %t3# RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=4 %s -o %t/test.o -split-dwarf-file %t/test.dwo4# RUN: cd %t5# RUN: llvm-symbolizer --verbose 0x0 --obj=test.o | FileCheck --check-prefix=SYM %s6# RUN: llvm-dwarfdump -lookup=0x1 test.o | FileCheck --check-prefix=LOOKUP %s7 8# SYM: Filename: .{{[/\\]}}.{{[/\\]}}./test.h9# SYM: Function start filename: .{{[/\\]}}.{{[/\\]}}test.cpp10 11# LOOKUP: Line info: line 0, column 0, start file 'test.cpp', start line 112 13 14 .text15 .file "test.cpp"16 .globl _Z2f1v # -- Begin function _Z2f1v17 .p2align 4, 0x9018 .type _Z2f1v,@function19_Z2f1v: # @_Z2f1v20.Lfunc_begin0:21 .file 1 "." "test.cpp"22 .loc 1 1 0 # test.cpp:1:023 .cfi_startproc24# %bb.0: # %entry25 .file 2 "." "./test.h"26 .loc 2 1 1 prologue_end # ./test.h:1:127 xorl %eax, %eax28 retq29.Ltmp0:30.Lfunc_end0:31 .size _Z2f1v, .Lfunc_end0-_Z2f1v32 .cfi_endproc33 # -- End function34 .section .debug_abbrev,"",@progbits35 .byte 1 # Abbreviation Code36 .byte 17 # DW_TAG_compile_unit37 .byte 0 # DW_CHILDREN_no38 .byte 16 # DW_AT_stmt_list39 .byte 23 # DW_FORM_sec_offset40 .byte 27 # DW_AT_comp_dir41 .byte 14 # DW_FORM_strp42 .ascii "\264B" # DW_AT_GNU_pubnames43 .byte 25 # DW_FORM_flag_present44 .ascii "\260B" # DW_AT_GNU_dwo_name45 .byte 14 # DW_FORM_strp46 .ascii "\261B" # DW_AT_GNU_dwo_id47 .byte 7 # DW_FORM_data848 .byte 17 # DW_AT_low_pc49 .byte 1 # DW_FORM_addr50 .byte 18 # DW_AT_high_pc51 .byte 6 # DW_FORM_data452 .ascii "\263B" # DW_AT_GNU_addr_base53 .byte 23 # DW_FORM_sec_offset54 .byte 0 # EOM(1)55 .byte 0 # EOM(2)56 .byte 0 # EOM(3)57 .section .debug_info,"",@progbits58.Lcu_begin0:59 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit60.Ldebug_info_start0:61 .short 4 # DWARF version number62 .long .debug_abbrev # Offset Into Abbrev. Section63 .byte 8 # Address Size (in bytes)64 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit65 .long .Lline_table_start0 # DW_AT_stmt_list66 .long .Lskel_string0 # DW_AT_comp_dir67 # DW_AT_GNU_pubnames68 .long .Lskel_string1 # DW_AT_GNU_dwo_name69 .quad 7198491773836599109 # DW_AT_GNU_dwo_id70 .quad .Lfunc_begin0 # DW_AT_low_pc71 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc72 .long .Laddr_table_base0 # DW_AT_GNU_addr_base73.Ldebug_info_end0:74 .section .debug_str,"MS",@progbits,175.Lskel_string0:76 .asciz "." # string offset=077.Lskel_string1:78 .asciz "test.dwo" # string offset=279 .section .debug_str.dwo,"eMS",@progbits,180.Linfo_string0:81 .asciz "_Z2f1v" # string offset=082.Linfo_string1:83 .asciz "f1" # string offset=784.Linfo_string2:85 .asciz "int" # string offset=1086.Linfo_string3:87 .asciz "clang version 13.0.0 (git@github.com:llvm/llvm-project.git 882ee7fbd6fc989fba53f3d9672440771feb80f5)" # string offset=1488.Linfo_string4:89 .asciz "test.cpp" # string offset=11590.Linfo_string5:91 .asciz "test.dwo" # string offset=12492 .section .debug_str_offsets.dwo,"e",@progbits93 .long 094 .long 795 .long 1096 .long 1497 .long 11598 .long 12499 .section .debug_info.dwo,"e",@progbits100 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit101.Ldebug_info_dwo_start0:102 .short 4 # DWARF version number103 .long 0 # Offset Into Abbrev. Section104 .byte 8 # Address Size (in bytes)105 .byte 1 # Abbrev [1] 0xb:0x23 DW_TAG_compile_unit106 .byte 3 # DW_AT_producer107 .short 33 # DW_AT_language108 .byte 4 # DW_AT_name109 .byte 5 # DW_AT_GNU_dwo_name110 .quad 7198491773836599109 # DW_AT_GNU_dwo_id111 .byte 2 # Abbrev [2] 0x19:0x10 DW_TAG_subprogram112 .byte 0 # DW_AT_low_pc113 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc114 .byte 1 # DW_AT_frame_base115 .byte 87116 # DW_AT_GNU_all_call_sites117 .byte 0 # DW_AT_linkage_name118 .byte 1 # DW_AT_name119 .byte 1 # DW_AT_decl_file120 .byte 1 # DW_AT_decl_line121 .long 41 # DW_AT_type122 # DW_AT_external123 .byte 3 # Abbrev [3] 0x29:0x4 DW_TAG_base_type124 .byte 2 # DW_AT_name125 .byte 5 # DW_AT_encoding126 .byte 4 # DW_AT_byte_size127 .byte 0 # End Of Children Mark128.Ldebug_info_dwo_end0:129 .section .debug_abbrev.dwo,"e",@progbits130 .byte 1 # Abbreviation Code131 .byte 17 # DW_TAG_compile_unit132 .byte 1 # DW_CHILDREN_yes133 .byte 37 # DW_AT_producer134 .ascii "\202>" # DW_FORM_GNU_str_index135 .byte 19 # DW_AT_language136 .byte 5 # DW_FORM_data2137 .byte 3 # DW_AT_name138 .ascii "\202>" # DW_FORM_GNU_str_index139 .ascii "\260B" # DW_AT_GNU_dwo_name140 .ascii "\202>" # DW_FORM_GNU_str_index141 .ascii "\261B" # DW_AT_GNU_dwo_id142 .byte 7 # DW_FORM_data8143 .byte 0 # EOM(1)144 .byte 0 # EOM(2)145 .byte 2 # Abbreviation Code146 .byte 46 # DW_TAG_subprogram147 .byte 0 # DW_CHILDREN_no148 .byte 17 # DW_AT_low_pc149 .ascii "\201>" # DW_FORM_GNU_addr_index150 .byte 18 # DW_AT_high_pc151 .byte 6 # DW_FORM_data4152 .byte 64 # DW_AT_frame_base153 .byte 24 # DW_FORM_exprloc154 .ascii "\227B" # DW_AT_GNU_all_call_sites155 .byte 25 # DW_FORM_flag_present156 .byte 110 # DW_AT_linkage_name157 .ascii "\202>" # DW_FORM_GNU_str_index158 .byte 3 # DW_AT_name159 .ascii "\202>" # DW_FORM_GNU_str_index160 .byte 58 # DW_AT_decl_file161 .byte 11 # DW_FORM_data1162 .byte 59 # DW_AT_decl_line163 .byte 11 # DW_FORM_data1164 .byte 73 # DW_AT_type165 .byte 19 # DW_FORM_ref4166 .byte 63 # DW_AT_external167 .byte 25 # DW_FORM_flag_present168 .byte 0 # EOM(1)169 .byte 0 # EOM(2)170 .byte 3 # Abbreviation Code171 .byte 36 # DW_TAG_base_type172 .byte 0 # DW_CHILDREN_no173 .byte 3 # DW_AT_name174 .ascii "\202>" # DW_FORM_GNU_str_index175 .byte 62 # DW_AT_encoding176 .byte 11 # DW_FORM_data1177 .byte 11 # DW_AT_byte_size178 .byte 11 # DW_FORM_data1179 .byte 0 # EOM(1)180 .byte 0 # EOM(2)181 .byte 0 # EOM(3)182 .section .debug_addr,"",@progbits183.Laddr_table_base0:184 .quad .Lfunc_begin0185 .section .debug_gnu_pubnames,"",@progbits186 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info187.LpubNames_start0:188 .short 2 # DWARF Version189 .long .Lcu_begin0 # Offset of Compilation Unit Info190 .long 48 # Compilation Unit Length191 .long 25 # DIE offset192 .byte 48 # Attributes: FUNCTION, EXTERNAL193 .asciz "f1" # External Name194 .long 0 # End Mark195.LpubNames_end0:196 .section .debug_gnu_pubtypes,"",@progbits197 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info198.LpubTypes_start0:199 .short 2 # DWARF Version200 .long .Lcu_begin0 # Offset of Compilation Unit Info201 .long 48 # Compilation Unit Length202 .long 41 # DIE offset203 .byte 144 # Attributes: TYPE, STATIC204 .asciz "int" # External Name205 .long 0 # End Mark206.LpubTypes_end0:207 .ident "clang version 13.0.0 (git@github.com:llvm/llvm-project.git 882ee7fbd6fc989fba53f3d9672440771feb80f5)"208 .section ".note.GNU-stack","",@progbits209 .addrsig210 .section .debug_line,"",@progbits211.Lline_table_start0:212