1# Binary and .o was generated by: 2# 1) clang++ -g -gsplit-dwarf=single splitdwarf-single-issue.cpp -O3 -o splitdwarf-single-issue.s -S 3# 2) Split in to two .s by making a copy and removing .dwo sections from skeleton .s. 4# 5# Input .cpp file 6# __attribute__((nodebug)) __attribute__((optnone)) void f1() { 7# } 8# 9# __attribute__((always_inline)) inline void f2() { 10# 11# f1(); 12# } 13# 14# int main() { 15# 16# f2(); 17# } 18 19# RUN: rm -rf %t 20# RUN: mkdir -p %t 21# RUN: llvm-mc --filetype=obj --triple=x86_64-pc-linux %s -o %t/symbolize-debug-fission-single -g 22# RUN: llvm-mc --filetype=obj --triple=x86_64-pc-linux %s --defsym INCDWO=1 -o %t/symbolize-debug-fission-single.o -g 23# RUN: cd %t 24# RUN: llvm-symbolizer 0x0000000000000011 -a --obj=%t/symbolize-debug-fission-single \ 25# RUN: | FileCheck %s 26 27# CHECK: 0x11 28# CHECK-NEXT: f2() 29# CHECK-NEXT: {{.*}}splitdwarf-single-issue.cpp:7:3 30# CHECK-NEXT: main 31# CHECK-NEXT: {{.*}}splitdwarf-single-issue.cpp:13:3 32 33 .text 34 .file "splitdwarf-single-issue.cpp" 35 .globl _Z2f1v # -- Begin function _Z2f1v 36 .p2align 4, 0x90 37 .type _Z2f1v,@function 38_Z2f1v: # @_Z2f1v 39.Lfunc_begin0: 40 .cfi_startproc 41# %bb.0: # %entry 42 retq 43.Lfunc_end0: 44 .size _Z2f1v, .Lfunc_end0-_Z2f1v 45 .cfi_endproc 46 # -- End function 47 .globl main # -- Begin function main 48 .p2align 4, 0x90 49 .type main,@function 50main: # @main 51.Lfunc_begin1: 52 .file 1 "." "splitdwarf-single-issue.cpp" 53 .loc 1 11 0 # splitdwarf-single-issue.cpp:11:0 54 .cfi_startproc 55# %bb.0: # %entry 56 pushq %rax 57 .cfi_def_cfa_offset 16 58.Ltmp0: 59 .loc 1 7 3 prologue_end # splitdwarf-single-issue.cpp:7:3 60 callq _Z2f1v 61.Ltmp1: 62 .loc 1 15 1 # splitdwarf-single-issue.cpp:15:1 63 xorl %eax, %eax 64 popq %rcx 65 .cfi_def_cfa_offset 8 66 retq 67.Ltmp2: 68.Lfunc_end1: 69 .size main, .Lfunc_end1-main 70 .cfi_endproc 71 # -- End function 72 .section .debug_abbrev,"",@progbits 73 .byte 1 # Abbreviation Code 74 .byte 17 # DW_TAG_compile_unit 75 .byte 0 # DW_CHILDREN_no 76 .byte 16 # DW_AT_stmt_list 77 .byte 23 # DW_FORM_sec_offset 78 .byte 27 # DW_AT_comp_dir 79 .byte 14 # DW_FORM_strp 80 .ascii "\264B" # DW_AT_GNU_pubnames 81 .byte 25 # DW_FORM_flag_present 82 .ascii "\260B" # DW_AT_GNU_dwo_name 83 .byte 14 # DW_FORM_strp 84 .ascii "\261B" # DW_AT_GNU_dwo_id 85 .byte 7 # DW_FORM_data8 86 .byte 17 # DW_AT_low_pc 87 .byte 1 # DW_FORM_addr 88 .byte 18 # DW_AT_high_pc 89 .byte 6 # DW_FORM_data4 90 .ascii "\263B" # DW_AT_GNU_addr_base 91 .byte 23 # DW_FORM_sec_offset 92 .byte 0 # EOM(1) 93 .byte 0 # EOM(2) 94 .byte 0 # EOM(3) 95 .section .debug_info,"",@progbits 96.Lcu_begin0: 97 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 98.Ldebug_info_start0: 99 .short 4 # DWARF version number 100 .long .debug_abbrev # Offset Into Abbrev. Section 101 .byte 8 # Address Size (in bytes) 102 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit 103 .long .Lline_table_start0 # DW_AT_stmt_list 104 .long .Lskel_string0 # DW_AT_comp_dir 105 # DW_AT_GNU_pubnames 106 .long .Lskel_string1 # DW_AT_GNU_dwo_name 107 .quad -4321749769762995760 # DW_AT_GNU_dwo_id 108 .quad .Lfunc_begin1 # DW_AT_low_pc 109 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc 110 .long .Laddr_table_base0 # DW_AT_GNU_addr_base 111.Ldebug_info_end0: 112 .section .debug_str,"MS",@progbits,1 113.Lskel_string0: 114 .asciz "." # string offset=0 115.Lskel_string1: 116 .asciz "symbolize-debug-fission-single.o" # string offset=37 117 .section .debug_addr,"",@progbits 118.Laddr_table_base0: 119 .quad .Lfunc_begin1 120 .quad .Ltmp0 121 .section .debug_gnu_pubnames,"",@progbits 122 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info 123.LpubNames_start0: 124 .short 2 # DWARF Version 125 .long .Lcu_begin0 # Offset of Compilation Unit Info 126 .long 48 # Compilation Unit Length 127 .long 31 # DIE offset 128 .byte 48 # Attributes: FUNCTION, EXTERNAL 129 .asciz "main" # External Name 130 .long 25 # DIE offset 131 .byte 48 # Attributes: FUNCTION, EXTERNAL 132 .asciz "f2" # External Name 133 .long 0 # End Mark 134.LpubNames_end0: 135 .section .debug_gnu_pubtypes,"",@progbits 136 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info 137.LpubTypes_start0: 138 .short 2 # DWARF Version 139 .long .Lcu_begin0 # Offset of Compilation Unit Info 140 .long 48 # Compilation Unit Length 141 .long 60 # DIE offset 142 .byte 144 # Attributes: TYPE, STATIC 143 .asciz "int" # External Name 144 .long 0 # End Mark 145.LpubTypes_end0: 146 .ident "clang version 13.0.0 (https://github.com/llvm/llvm-project.git f0363d3d38b9a3b831b1bb6fa602eff54ac928fa)" 147 .section ".note.GNU-stack","",@progbits 148 .addrsig 149 .section .debug_line,"",@progbits 150.Lline_table_start0: 151.ifdef INCDWO 152 .section .debug_str.dwo,"eMS",@progbits,1 153.Linfo_string0: 154 .asciz "_Z2f2v" # string offset=0 155.Linfo_string1: 156 .asciz "f2" # string offset=7 157.Linfo_string2: 158 .asciz "main" # string offset=10 159.Linfo_string3: 160 .asciz "int" # string offset=15 161.Linfo_string4: 162 .asciz "clang version 13.0.0 (https://github.com/llvm/llvm-project.git f0363d3d38b9a3b831b1bb6fa602eff54ac928fa)" # string offset=19 163.Linfo_string5: 164 .asciz "splitdwarf-single-issue.cpp" # string offset=124 165.Linfo_string6: 166 .asciz "symbolize-debug-fission-single.o" # string offset=152 167 .section .debug_str_offsets.dwo,"e",@progbits 168 .long 0 169 .long 7 170 .long 10 171 .long 15 172 .long 19 173 .long 124 174 .long 152 175 .section .debug_info.dwo,"e",@progbits 176 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit 177.Ldebug_info_dwo_start0: 178 .short 4 # DWARF version number 179 .long 0 # Offset Into Abbrev. Section 180 .byte 8 # Address Size (in bytes) 181 .byte 1 # Abbrev [1] 0xb:0x36 DW_TAG_compile_unit 182 .byte 4 # DW_AT_producer 183 .short 33 # DW_AT_language 184 .byte 5 # DW_AT_name 185 .byte 6 # DW_AT_GNU_dwo_name 186 .quad -4321749769762995760 # DW_AT_GNU_dwo_id 187 .byte 2 # Abbrev [2] 0x19:0x6 DW_TAG_subprogram 188 .byte 0 # DW_AT_linkage_name 189 .byte 1 # DW_AT_name 190 .byte 1 # DW_AT_decl_file 191 .byte 5 # DW_AT_decl_line 192 # DW_AT_external 193 .byte 1 # DW_AT_inline 194 .byte 3 # Abbrev [3] 0x1f:0x1d DW_TAG_subprogram 195 .byte 0 # DW_AT_low_pc 196 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc 197 .byte 1 # DW_AT_frame_base 198 .byte 87 199 # DW_AT_GNU_all_call_sites 200 .byte 2 # DW_AT_name 201 .byte 1 # DW_AT_decl_file 202 .byte 11 # DW_AT_decl_line 203 .long 60 # DW_AT_type 204 # DW_AT_external 205 .byte 4 # Abbrev [4] 0x2e:0xd DW_TAG_inlined_subroutine 206 .long 25 # DW_AT_abstract_origin 207 .byte 1 # DW_AT_low_pc 208 .long .Ltmp1-.Ltmp0 # DW_AT_high_pc 209 .byte 1 # DW_AT_call_file 210 .byte 13 # DW_AT_call_line 211 .byte 3 # DW_AT_call_column 212 .byte 0 # End Of Children Mark 213 .byte 5 # Abbrev [5] 0x3c:0x4 DW_TAG_base_type 214 .byte 3 # DW_AT_name 215 .byte 5 # DW_AT_encoding 216 .byte 4 # DW_AT_byte_size 217 .byte 0 # End Of Children Mark 218.Ldebug_info_dwo_end0: 219 .section .debug_abbrev.dwo,"e",@progbits 220 .byte 1 # Abbreviation Code 221 .byte 17 # DW_TAG_compile_unit 222 .byte 1 # DW_CHILDREN_yes 223 .byte 37 # DW_AT_producer 224 .ascii "\202>" # DW_FORM_GNU_str_index 225 .byte 19 # DW_AT_language 226 .byte 5 # DW_FORM_data2 227 .byte 3 # DW_AT_name 228 .ascii "\202>" # DW_FORM_GNU_str_index 229 .ascii "\260B" # DW_AT_GNU_dwo_name 230 .ascii "\202>" # DW_FORM_GNU_str_index 231 .ascii "\261B" # DW_AT_GNU_dwo_id 232 .byte 7 # DW_FORM_data8 233 .byte 0 # EOM(1) 234 .byte 0 # EOM(2) 235 .byte 2 # Abbreviation Code 236 .byte 46 # DW_TAG_subprogram 237 .byte 0 # DW_CHILDREN_no 238 .byte 110 # DW_AT_linkage_name 239 .ascii "\202>" # DW_FORM_GNU_str_index 240 .byte 3 # DW_AT_name 241 .ascii "\202>" # DW_FORM_GNU_str_index 242 .byte 58 # DW_AT_decl_file 243 .byte 11 # DW_FORM_data1 244 .byte 59 # DW_AT_decl_line 245 .byte 11 # DW_FORM_data1 246 .byte 63 # DW_AT_external 247 .byte 25 # DW_FORM_flag_present 248 .byte 32 # DW_AT_inline 249 .byte 11 # DW_FORM_data1 250 .byte 0 # EOM(1) 251 .byte 0 # EOM(2) 252 .byte 3 # Abbreviation Code 253 .byte 46 # DW_TAG_subprogram 254 .byte 1 # DW_CHILDREN_yes 255 .byte 17 # DW_AT_low_pc 256 .ascii "\201>" # DW_FORM_GNU_addr_index 257 .byte 18 # DW_AT_high_pc 258 .byte 6 # DW_FORM_data4 259 .byte 64 # DW_AT_frame_base 260 .byte 24 # DW_FORM_exprloc 261 .ascii "\227B" # DW_AT_GNU_all_call_sites 262 .byte 25 # DW_FORM_flag_present 263 .byte 3 # DW_AT_name 264 .ascii "\202>" # DW_FORM_GNU_str_index 265 .byte 58 # DW_AT_decl_file 266 .byte 11 # DW_FORM_data1 267 .byte 59 # DW_AT_decl_line 268 .byte 11 # DW_FORM_data1 269 .byte 73 # DW_AT_type 270 .byte 19 # DW_FORM_ref4 271 .byte 63 # DW_AT_external 272 .byte 25 # DW_FORM_flag_present 273 .byte 0 # EOM(1) 274 .byte 0 # EOM(2) 275 .byte 4 # Abbreviation Code 276 .byte 29 # DW_TAG_inlined_subroutine 277 .byte 0 # DW_CHILDREN_no 278 .byte 49 # DW_AT_abstract_origin 279 .byte 19 # DW_FORM_ref4 280 .byte 17 # DW_AT_low_pc 281 .ascii "\201>" # DW_FORM_GNU_addr_index 282 .byte 18 # DW_AT_high_pc 283 .byte 6 # DW_FORM_data4 284 .byte 88 # DW_AT_call_file 285 .byte 11 # DW_FORM_data1 286 .byte 89 # DW_AT_call_line 287 .byte 11 # DW_FORM_data1 288 .byte 87 # DW_AT_call_column 289 .byte 11 # DW_FORM_data1 290 .byte 0 # EOM(1) 291 .byte 0 # EOM(2) 292 .byte 5 # Abbreviation Code 293 .byte 36 # DW_TAG_base_type 294 .byte 0 # DW_CHILDREN_no 295 .byte 3 # DW_AT_name 296 .ascii "\202>" # DW_FORM_GNU_str_index 297 .byte 62 # DW_AT_encoding 298 .byte 11 # DW_FORM_data1 299 .byte 11 # DW_AT_byte_size 300 .byte 11 # DW_FORM_data1 301 .byte 0 # EOM(1) 302 .byte 0 # EOM(2) 303 .byte 0 # EOM(3) 304.endif 305