410 lines · plain
1# clang++ helper.cpp -g -O2 -S2# int fooVar = 0;3# void useFoo(int * x) {4# *x += 4;5# }6#7# int foo(int argc) {8# int x = argc;9# useFoo(&x);10# return x;11# }12# Manually removed DW_AT_location13 .text14 .file "foo.cpp"15 .file 0 "/testLocListMultiple" "foo.cpp" md5 0x9410f31145d031fcc1f2464b809e409a16 .globl _Z6useFooPi # -- Begin function _Z6useFooPi17 .p2align 4, 0x9018 .type _Z6useFooPi,@function19_Z6useFooPi: # @_Z6useFooPi20.Lfunc_begin0:21 .loc 0 2 0 # foo.cpp:2:022 .cfi_startproc23# %bb.0: # %entry24 #DEBUG_VALUE: useFoo:x <- $rdi25 .loc 0 3 4 prologue_end # foo.cpp:3:426 addl $4, (%rdi)27 .loc 0 4 1 # foo.cpp:4:128 retq29.Ltmp0:30.Lfunc_end0:31 .size _Z6useFooPi, .Lfunc_end0-_Z6useFooPi32 .cfi_endproc33 # -- End function34 .globl _Z3fooi # -- Begin function _Z3fooi35 .p2align 4, 0x9036 .type _Z3fooi,@function37_Z3fooi: # @_Z3fooi38.Lfunc_begin1:39 .loc 0 6 0 # foo.cpp:6:040 .cfi_startproc41# %bb.0: # %entry42 #DEBUG_VALUE: foo:argc <- $edi43 #DEBUG_VALUE: foo:x <- $edi44 # kill: def $edi killed $edi def $rdi45 #DEBUG_VALUE: useFoo:x <- undef46 .loc 0 3 4 prologue_end # foo.cpp:3:447 leal 4(%rdi), %eax48.Ltmp1:49 #DEBUG_VALUE: foo:x <- $eax50 .loc 0 9 4 # foo.cpp:9:451 retq52.Ltmp2:53.Lfunc_end1:54 .size _Z3fooi, .Lfunc_end1-_Z3fooi55 .cfi_endproc56 # -- End function57 .type fooVar,@object # @fooVar58 .bss59 .globl fooVar60 .p2align 261fooVar:62 .long 0 # 0x063 .size fooVar, 464 65 .section .debug_loclists,"",@progbits66 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length67.Ldebug_list_header_start0:68 .short 5 # Version69 .byte 8 # Address size70 .byte 0 # Segment selector size71 .long 1 # Offset entry count72.Lloclists_table_base0:73 .long .Ldebug_loc0-.Lloclists_table_base074.Ldebug_loc0:75 .byte 4 # DW_LLE_offset_pair76 .uleb128 .Lfunc_begin1-.Lfunc_begin0 # starting offset77 .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset78 .byte 1 # Loc expr size79 .byte 85 # super-register DW_OP_reg580 .byte 4 # DW_LLE_offset_pair81 .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset82 .uleb128 .Lfunc_end1-.Lfunc_begin0 # ending offset83 .byte 1 # Loc expr size84 .byte 80 # super-register DW_OP_reg085 .byte 0 # DW_LLE_end_of_list86.Ldebug_list_header_end0:87 .section .debug_abbrev,"",@progbits88 .byte 1 # Abbreviation Code89 .byte 17 # DW_TAG_compile_unit90 .byte 1 # DW_CHILDREN_yes91 .byte 37 # DW_AT_producer92 .byte 37 # DW_FORM_strx193 .byte 19 # DW_AT_language94 .byte 5 # DW_FORM_data295 .byte 3 # DW_AT_name96 .byte 37 # DW_FORM_strx197 .byte 114 # DW_AT_str_offsets_base98 .byte 23 # DW_FORM_sec_offset99 .byte 16 # DW_AT_stmt_list100 .byte 23 # DW_FORM_sec_offset101 .byte 27 # DW_AT_comp_dir102 .byte 37 # DW_FORM_strx1103 .byte 17 # DW_AT_low_pc104 .byte 27 # DW_FORM_addrx105 .byte 18 # DW_AT_high_pc106 .byte 6 # DW_FORM_data4107 .byte 115 # DW_AT_addr_base108 .byte 23 # DW_FORM_sec_offset109 .ascii "\214\001" # DW_AT_loclists_base110 .byte 23 # DW_FORM_sec_offset111 .byte 0 # EOM(1)112 .byte 0 # EOM(2)113 .byte 2 # Abbreviation Code114 .byte 52 # DW_TAG_variable115 .byte 0 # DW_CHILDREN_no116 .byte 3 # DW_AT_name117 .byte 37 # DW_FORM_strx1118 .byte 73 # DW_AT_type119 .byte 19 # DW_FORM_ref4120 .byte 63 # DW_AT_external121 .byte 25 # DW_FORM_flag_present122 .byte 58 # DW_AT_decl_file123 .byte 11 # DW_FORM_data1124 .byte 59 # DW_AT_decl_line125 .byte 11 # DW_FORM_data1126 .byte 0 # EOM(1)127 .byte 0 # EOM(2)128 .byte 3 # Abbreviation Code129 .byte 36 # DW_TAG_base_type130 .byte 0 # DW_CHILDREN_no131 .byte 3 # DW_AT_name132 .byte 37 # DW_FORM_strx1133 .byte 62 # DW_AT_encoding134 .byte 11 # DW_FORM_data1135 .byte 11 # DW_AT_byte_size136 .byte 11 # DW_FORM_data1137 .byte 0 # EOM(1)138 .byte 0 # EOM(2)139 .byte 4 # Abbreviation Code140 .byte 46 # DW_TAG_subprogram141 .byte 1 # DW_CHILDREN_yes142 .byte 17 # DW_AT_low_pc143 .byte 27 # DW_FORM_addrx144 .byte 18 # DW_AT_high_pc145 .byte 6 # DW_FORM_data4146 .byte 64 # DW_AT_frame_base147 .byte 24 # DW_FORM_exprloc148 .byte 122 # DW_AT_call_all_calls149 .byte 25 # DW_FORM_flag_present150 .byte 49 # DW_AT_abstract_origin151 .byte 19 # DW_FORM_ref4152 .byte 0 # EOM(1)153 .byte 0 # EOM(2)154 .byte 5 # Abbreviation Code155 .byte 5 # DW_TAG_formal_parameter156 .byte 0 # DW_CHILDREN_no157 .byte 49 # DW_AT_abstract_origin158 .byte 19 # DW_FORM_ref4159 .byte 0 # EOM(1)160 .byte 0 # EOM(2)161 .byte 6 # Abbreviation Code162 .byte 46 # DW_TAG_subprogram163 .byte 1 # DW_CHILDREN_yes164 .byte 110 # DW_AT_linkage_name165 .byte 37 # DW_FORM_strx1166 .byte 3 # DW_AT_name167 .byte 37 # DW_FORM_strx1168 .byte 58 # DW_AT_decl_file169 .byte 11 # DW_FORM_data1170 .byte 59 # DW_AT_decl_line171 .byte 11 # DW_FORM_data1172 .byte 63 # DW_AT_external173 .byte 25 # DW_FORM_flag_present174 .byte 32 # DW_AT_inline175 .byte 33 # DW_FORM_implicit_const176 .byte 1177 .byte 0 # EOM(1)178 .byte 0 # EOM(2)179 .byte 7 # Abbreviation Code180 .byte 5 # DW_TAG_formal_parameter181 .byte 0 # DW_CHILDREN_no182 .byte 3 # DW_AT_name183 .byte 37 # DW_FORM_strx1184 .byte 58 # DW_AT_decl_file185 .byte 11 # DW_FORM_data1186 .byte 59 # DW_AT_decl_line187 .byte 11 # DW_FORM_data1188 .byte 73 # DW_AT_type189 .byte 19 # DW_FORM_ref4190 .byte 0 # EOM(1)191 .byte 0 # EOM(2)192 .byte 8 # Abbreviation Code193 .byte 15 # DW_TAG_pointer_type194 .byte 0 # DW_CHILDREN_no195 .byte 73 # DW_AT_type196 .byte 19 # DW_FORM_ref4197 .byte 0 # EOM(1)198 .byte 0 # EOM(2)199 .byte 9 # Abbreviation Code200 .byte 46 # DW_TAG_subprogram201 .byte 1 # DW_CHILDREN_yes202 .byte 17 # DW_AT_low_pc203 .byte 27 # DW_FORM_addrx204 .byte 18 # DW_AT_high_pc205 .byte 6 # DW_FORM_data4206 .byte 64 # DW_AT_frame_base207 .byte 24 # DW_FORM_exprloc208 .byte 122 # DW_AT_call_all_calls209 .byte 25 # DW_FORM_flag_present210 .byte 110 # DW_AT_linkage_name211 .byte 37 # DW_FORM_strx1212 .byte 3 # DW_AT_name213 .byte 37 # DW_FORM_strx1214 .byte 58 # DW_AT_decl_file215 .byte 11 # DW_FORM_data1216 .byte 59 # DW_AT_decl_line217 .byte 11 # DW_FORM_data1218 .byte 73 # DW_AT_type219 .byte 19 # DW_FORM_ref4220 .byte 63 # DW_AT_external221 .byte 25 # DW_FORM_flag_present222 .byte 0 # EOM(1)223 .byte 0 # EOM(2)224 .byte 10 # Abbreviation Code225 .byte 5 # DW_TAG_formal_parameter226 .byte 0 # DW_CHILDREN_no227 .byte 3 # DW_AT_name228 .byte 37 # DW_FORM_strx1229 .byte 58 # DW_AT_decl_file230 .byte 11 # DW_FORM_data1231 .byte 59 # DW_AT_decl_line232 .byte 11 # DW_FORM_data1233 .byte 73 # DW_AT_type234 .byte 19 # DW_FORM_ref4235 .byte 0 # EOM(1)236 .byte 0 # EOM(2)237 .byte 11 # Abbreviation Code238 .byte 52 # DW_TAG_variable239 .byte 0 # DW_CHILDREN_no240 .byte 3 # DW_AT_name241 .byte 37 # DW_FORM_strx1242 .byte 58 # DW_AT_decl_file243 .byte 11 # DW_FORM_data1244 .byte 59 # DW_AT_decl_line245 .byte 11 # DW_FORM_data1246 .byte 73 # DW_AT_type247 .byte 19 # DW_FORM_ref4248 .byte 0 # EOM(1)249 .byte 0 # EOM(2)250 .byte 12 # Abbreviation Code251 .byte 29 # DW_TAG_inlined_subroutine252 .byte 0 # DW_CHILDREN_no253 .byte 49 # DW_AT_abstract_origin254 .byte 19 # DW_FORM_ref4255 .byte 17 # DW_AT_low_pc256 .byte 27 # DW_FORM_addrx257 .byte 18 # DW_AT_high_pc258 .byte 6 # DW_FORM_data4259 .byte 88 # DW_AT_call_file260 .byte 11 # DW_FORM_data1261 .byte 89 # DW_AT_call_line262 .byte 11 # DW_FORM_data1263 .byte 87 # DW_AT_call_column264 .byte 11 # DW_FORM_data1265 .byte 0 # EOM(1)266 .byte 0 # EOM(2)267 .byte 0 # EOM(3)268 .section .debug_info,"",@progbits269.Lcu_begin0:270 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit271.Ldebug_info_start0:272 .short 5 # DWARF version number273 .byte 1 # DWARF Unit Type274 .byte 8 # Address Size (in bytes)275 .long .debug_abbrev # Offset Into Abbrev. Section276 .byte 1 # Abbrev [1] 0xc:0x83 DW_TAG_compile_unit277 .byte 0 # DW_AT_producer278 .short 33 # DW_AT_language279 .byte 1 # DW_AT_name280 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base281 .long .Lline_table_start0 # DW_AT_stmt_list282 .byte 2 # DW_AT_comp_dir283 .byte 1 # DW_AT_low_pc284 .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc285 .long .Laddr_table_base0 # DW_AT_addr_base286 .long .Lloclists_table_base0 # DW_AT_loclists_base287 .byte 2 # Abbrev [2] 0x27:0xb DW_TAG_variable288 .byte 3 # DW_AT_name289 .long 39 # DW_AT_type290 # DW_AT_external291 .byte 0 # DW_AT_decl_file292 .byte 1 # DW_AT_decl_line293 .byte 3 # Abbrev [3] 0x32:0x4 DW_TAG_base_type294 .byte 4 # DW_AT_name295 .byte 5 # DW_AT_encoding296 .byte 4 # DW_AT_byte_size297 .byte 4 # Abbrev [4] 0x36:0x14 DW_TAG_subprogram298 .byte 1 # DW_AT_low_pc299 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc300 .byte 1 # DW_AT_frame_base301 .byte 87302 # DW_AT_call_all_calls303 .long 74 # DW_AT_abstract_origin304 .byte 5 # Abbrev [5] 0x42:0x7 DW_TAG_formal_parameter305 .long 74 # DW_AT_abstract_origin306 .byte 0 # End Of Children Mark307 .byte 6 # Abbrev [6] 0x4a:0xe DW_TAG_subprogram308 .byte 5 # DW_AT_linkage_name309 .byte 6 # DW_AT_name310 .byte 0 # DW_AT_decl_file311 .byte 2 # DW_AT_decl_line312 # DW_AT_external313 # DW_AT_inline314 .byte 7 # Abbrev [7] 0x4f:0x8 DW_TAG_formal_parameter315 .byte 7 # DW_AT_name316 .byte 0 # DW_AT_decl_file317 .byte 2 # DW_AT_decl_line318 .long 88 # DW_AT_type319 .byte 0 # End Of Children Mark320 .byte 8 # Abbrev [8] 0x58:0x5 DW_TAG_pointer_type321 .long 39 # DW_AT_type322 .byte 9 # Abbrev [9] 0x5d:0x31 DW_TAG_subprogram323 .byte 2 # DW_AT_low_pc324 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc325 .byte 1 # DW_AT_frame_base326 .byte 87327 # DW_AT_call_all_calls328 .byte 8 # DW_AT_linkage_name329 .byte 9 # DW_AT_name330 .byte 0 # DW_AT_decl_file331 .byte 6 # DW_AT_decl_line332 .long 39 # DW_AT_type333 # DW_AT_external334 .byte 10 # Abbrev [10] 0x6d:0xa DW_TAG_formal_parameter335 .byte 10 # DW_AT_name336 .byte 0 # DW_AT_decl_file337 .byte 6 # DW_AT_decl_line338 .long 39 # DW_AT_type339 .byte 11 # Abbrev [11] 0x77:0x9 DW_TAG_variable340 .byte 7 # DW_AT_name341 .byte 0 # DW_AT_decl_file342 .byte 7 # DW_AT_decl_line343 .long 39 # DW_AT_type344 .byte 12 # Abbrev [12] 0x80:0xd DW_TAG_inlined_subroutine345 .long 74 # DW_AT_abstract_origin346 .byte 2 # DW_AT_low_pc347 .long .Ltmp1-.Lfunc_begin1 # DW_AT_high_pc348 .byte 0 # DW_AT_call_file349 .byte 8 # DW_AT_call_line350 .byte 4 # DW_AT_call_column351 .byte 0 # End Of Children Mark352 .byte 0 # End Of Children Mark353.Ldebug_info_end0:354 .section .debug_str_offsets,"",@progbits355 .long 48 # Length of String Offsets Set356 .short 5357 .short 0358.Lstr_offsets_base0:359 .section .debug_str,"MS",@progbits,1360.Linfo_string0:361 .asciz "clang version 15.0.0)" # string offset=0362.Linfo_string1:363 .asciz "foo.cpp" # string offset=134364.Linfo_string2:365 .asciz "/testLocListMultiple" # string offset=142366.Linfo_string3:367 .asciz "fooVar" # string offset=199368.Linfo_string4:369 .asciz "int" # string offset=206370.Linfo_string5:371 .asciz "_Z6useFooPi" # string offset=210372.Linfo_string6:373 .asciz "useFoo" # string offset=222374.Linfo_string7:375 .asciz "x" # string offset=229376.Linfo_string8:377 .asciz "_Z3fooi" # string offset=231378.Linfo_string9:379 .asciz "foo" # string offset=239380.Linfo_string10:381 .asciz "argc" # string offset=243382 .section .debug_str_offsets,"",@progbits383 .long .Linfo_string0384 .long .Linfo_string1385 .long .Linfo_string2386 .long .Linfo_string3387 .long .Linfo_string4388 .long .Linfo_string5389 .long .Linfo_string6390 .long .Linfo_string7391 .long .Linfo_string8392 .long .Linfo_string9393 .long .Linfo_string10394 .section .debug_addr,"",@progbits395 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution396.Ldebug_addr_start0:397 .short 5 # DWARF version number398 .byte 8 # Address size399 .byte 0 # Segment selector size400.Laddr_table_base0:401 .quad fooVar402 .quad .Lfunc_begin0403 .quad .Lfunc_begin1404.Ldebug_addr_end0:405 .ident "clang version 15.0.0"406 .section ".note.GNU-stack","",@progbits407 .addrsig408 .section .debug_line,"",@progbits409.Lline_table_start0:410