1# clang++ helper.cpp -g -O2 -S 2# 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_location 13 .text 14 .file "foo.cpp" 15 .file 0 "/testLocListMultiple" "foo.cpp" md5 0x9410f31145d031fcc1f2464b809e409a 16 .globl _Z6useFooPi # -- Begin function _Z6useFooPi 17 .p2align 4, 0x90 18 .type _Z6useFooPi,@function 19_Z6useFooPi: # @_Z6useFooPi 20.Lfunc_begin0: 21 .loc 0 2 0 # foo.cpp:2:0 22 .cfi_startproc 23# %bb.0: # %entry 24 #DEBUG_VALUE: useFoo:x <- $rdi 25 .loc 0 3 4 prologue_end # foo.cpp:3:4 26 addl $4, (%rdi) 27 .loc 0 4 1 # foo.cpp:4:1 28 retq 29.Ltmp0: 30.Lfunc_end0: 31 .size _Z6useFooPi, .Lfunc_end0-_Z6useFooPi 32 .cfi_endproc 33 # -- End function 34 .globl _Z3fooi # -- Begin function _Z3fooi 35 .p2align 4, 0x90 36 .type _Z3fooi,@function 37_Z3fooi: # @_Z3fooi 38.Lfunc_begin1: 39 .loc 0 6 0 # foo.cpp:6:0 40 .cfi_startproc 41# %bb.0: # %entry 42 #DEBUG_VALUE: foo:argc <- $edi 43 #DEBUG_VALUE: foo:x <- $edi 44 # kill: def $edi killed $edi def $rdi 45 #DEBUG_VALUE: useFoo:x <- undef 46 .loc 0 3 4 prologue_end # foo.cpp:3:4 47 leal 4(%rdi), %eax 48.Ltmp1: 49 #DEBUG_VALUE: foo:x <- $eax 50 .loc 0 9 4 # foo.cpp:9:4 51 retq 52.Ltmp2: 53.Lfunc_end1: 54 .size _Z3fooi, .Lfunc_end1-_Z3fooi 55 .cfi_endproc 56 # -- End function 57 .type fooVar,@object # @fooVar 58 .bss 59 .globl fooVar 60 .p2align 2 61fooVar: 62 .long 0 # 0x0 63 .size fooVar, 4 64 65 .section .debug_loclists,"",@progbits 66 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length 67.Ldebug_list_header_start0: 68 .short 5 # Version 69 .byte 8 # Address size 70 .byte 0 # Segment selector size 71 .long 1 # Offset entry count 72.Lloclists_table_base0: 73 .long .Ldebug_loc0-.Lloclists_table_base0 74.Ldebug_loc0: 75 .byte 4 # DW_LLE_offset_pair 76 .uleb128 .Lfunc_begin1-.Lfunc_begin0 # starting offset 77 .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset 78 .byte 1 # Loc expr size 79 .byte 85 # super-register DW_OP_reg5 80 .byte 4 # DW_LLE_offset_pair 81 .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset 82 .uleb128 .Lfunc_end1-.Lfunc_begin0 # ending offset 83 .byte 1 # Loc expr size 84 .byte 80 # super-register DW_OP_reg0 85 .byte 0 # DW_LLE_end_of_list 86.Ldebug_list_header_end0: 87 .section .debug_abbrev,"",@progbits 88 .byte 1 # Abbreviation Code 89 .byte 17 # DW_TAG_compile_unit 90 .byte 1 # DW_CHILDREN_yes 91 .byte 37 # DW_AT_producer 92 .byte 37 # DW_FORM_strx1 93 .byte 19 # DW_AT_language 94 .byte 5 # DW_FORM_data2 95 .byte 3 # DW_AT_name 96 .byte 37 # DW_FORM_strx1 97 .byte 114 # DW_AT_str_offsets_base 98 .byte 23 # DW_FORM_sec_offset 99 .byte 16 # DW_AT_stmt_list 100 .byte 23 # DW_FORM_sec_offset 101 .byte 27 # DW_AT_comp_dir 102 .byte 37 # DW_FORM_strx1 103 .byte 17 # DW_AT_low_pc 104 .byte 27 # DW_FORM_addrx 105 .byte 18 # DW_AT_high_pc 106 .byte 6 # DW_FORM_data4 107 .byte 115 # DW_AT_addr_base 108 .byte 23 # DW_FORM_sec_offset 109 .ascii "\214\001" # DW_AT_loclists_base 110 .byte 23 # DW_FORM_sec_offset 111 .byte 0 # EOM(1) 112 .byte 0 # EOM(2) 113 .byte 2 # Abbreviation Code 114 .byte 52 # DW_TAG_variable 115 .byte 0 # DW_CHILDREN_no 116 .byte 3 # DW_AT_name 117 .byte 37 # DW_FORM_strx1 118 .byte 73 # DW_AT_type 119 .byte 19 # DW_FORM_ref4 120 .byte 63 # DW_AT_external 121 .byte 25 # DW_FORM_flag_present 122 .byte 58 # DW_AT_decl_file 123 .byte 11 # DW_FORM_data1 124 .byte 59 # DW_AT_decl_line 125 .byte 11 # DW_FORM_data1 126 .byte 0 # EOM(1) 127 .byte 0 # EOM(2) 128 .byte 3 # Abbreviation Code 129 .byte 36 # DW_TAG_base_type 130 .byte 0 # DW_CHILDREN_no 131 .byte 3 # DW_AT_name 132 .byte 37 # DW_FORM_strx1 133 .byte 62 # DW_AT_encoding 134 .byte 11 # DW_FORM_data1 135 .byte 11 # DW_AT_byte_size 136 .byte 11 # DW_FORM_data1 137 .byte 0 # EOM(1) 138 .byte 0 # EOM(2) 139 .byte 4 # Abbreviation Code 140 .byte 46 # DW_TAG_subprogram 141 .byte 1 # DW_CHILDREN_yes 142 .byte 17 # DW_AT_low_pc 143 .byte 27 # DW_FORM_addrx 144 .byte 18 # DW_AT_high_pc 145 .byte 6 # DW_FORM_data4 146 .byte 64 # DW_AT_frame_base 147 .byte 24 # DW_FORM_exprloc 148 .byte 122 # DW_AT_call_all_calls 149 .byte 25 # DW_FORM_flag_present 150 .byte 49 # DW_AT_abstract_origin 151 .byte 19 # DW_FORM_ref4 152 .byte 0 # EOM(1) 153 .byte 0 # EOM(2) 154 .byte 5 # Abbreviation Code 155 .byte 5 # DW_TAG_formal_parameter 156 .byte 0 # DW_CHILDREN_no 157 .byte 49 # DW_AT_abstract_origin 158 .byte 19 # DW_FORM_ref4 159 .byte 0 # EOM(1) 160 .byte 0 # EOM(2) 161 .byte 6 # Abbreviation Code 162 .byte 46 # DW_TAG_subprogram 163 .byte 1 # DW_CHILDREN_yes 164 .byte 110 # DW_AT_linkage_name 165 .byte 37 # DW_FORM_strx1 166 .byte 3 # DW_AT_name 167 .byte 37 # DW_FORM_strx1 168 .byte 58 # DW_AT_decl_file 169 .byte 11 # DW_FORM_data1 170 .byte 59 # DW_AT_decl_line 171 .byte 11 # DW_FORM_data1 172 .byte 63 # DW_AT_external 173 .byte 25 # DW_FORM_flag_present 174 .byte 32 # DW_AT_inline 175 .byte 33 # DW_FORM_implicit_const 176 .byte 1 177 .byte 0 # EOM(1) 178 .byte 0 # EOM(2) 179 .byte 7 # Abbreviation Code 180 .byte 5 # DW_TAG_formal_parameter 181 .byte 0 # DW_CHILDREN_no 182 .byte 3 # DW_AT_name 183 .byte 37 # DW_FORM_strx1 184 .byte 58 # DW_AT_decl_file 185 .byte 11 # DW_FORM_data1 186 .byte 59 # DW_AT_decl_line 187 .byte 11 # DW_FORM_data1 188 .byte 73 # DW_AT_type 189 .byte 19 # DW_FORM_ref4 190 .byte 0 # EOM(1) 191 .byte 0 # EOM(2) 192 .byte 8 # Abbreviation Code 193 .byte 15 # DW_TAG_pointer_type 194 .byte 0 # DW_CHILDREN_no 195 .byte 73 # DW_AT_type 196 .byte 19 # DW_FORM_ref4 197 .byte 0 # EOM(1) 198 .byte 0 # EOM(2) 199 .byte 9 # Abbreviation Code 200 .byte 46 # DW_TAG_subprogram 201 .byte 1 # DW_CHILDREN_yes 202 .byte 17 # DW_AT_low_pc 203 .byte 27 # DW_FORM_addrx 204 .byte 18 # DW_AT_high_pc 205 .byte 6 # DW_FORM_data4 206 .byte 64 # DW_AT_frame_base 207 .byte 24 # DW_FORM_exprloc 208 .byte 122 # DW_AT_call_all_calls 209 .byte 25 # DW_FORM_flag_present 210 .byte 110 # DW_AT_linkage_name 211 .byte 37 # DW_FORM_strx1 212 .byte 3 # DW_AT_name 213 .byte 37 # DW_FORM_strx1 214 .byte 58 # DW_AT_decl_file 215 .byte 11 # DW_FORM_data1 216 .byte 59 # DW_AT_decl_line 217 .byte 11 # DW_FORM_data1 218 .byte 73 # DW_AT_type 219 .byte 19 # DW_FORM_ref4 220 .byte 63 # DW_AT_external 221 .byte 25 # DW_FORM_flag_present 222 .byte 0 # EOM(1) 223 .byte 0 # EOM(2) 224 .byte 10 # Abbreviation Code 225 .byte 5 # DW_TAG_formal_parameter 226 .byte 0 # DW_CHILDREN_no 227 .byte 3 # DW_AT_name 228 .byte 37 # DW_FORM_strx1 229 .byte 58 # DW_AT_decl_file 230 .byte 11 # DW_FORM_data1 231 .byte 59 # DW_AT_decl_line 232 .byte 11 # DW_FORM_data1 233 .byte 73 # DW_AT_type 234 .byte 19 # DW_FORM_ref4 235 .byte 0 # EOM(1) 236 .byte 0 # EOM(2) 237 .byte 11 # Abbreviation Code 238 .byte 52 # DW_TAG_variable 239 .byte 0 # DW_CHILDREN_no 240 .byte 3 # DW_AT_name 241 .byte 37 # DW_FORM_strx1 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 73 # DW_AT_type 247 .byte 19 # DW_FORM_ref4 248 .byte 0 # EOM(1) 249 .byte 0 # EOM(2) 250 .byte 12 # Abbreviation Code 251 .byte 29 # DW_TAG_inlined_subroutine 252 .byte 0 # DW_CHILDREN_no 253 .byte 49 # DW_AT_abstract_origin 254 .byte 19 # DW_FORM_ref4 255 .byte 17 # DW_AT_low_pc 256 .byte 27 # DW_FORM_addrx 257 .byte 18 # DW_AT_high_pc 258 .byte 6 # DW_FORM_data4 259 .byte 88 # DW_AT_call_file 260 .byte 11 # DW_FORM_data1 261 .byte 89 # DW_AT_call_line 262 .byte 11 # DW_FORM_data1 263 .byte 87 # DW_AT_call_column 264 .byte 11 # DW_FORM_data1 265 .byte 0 # EOM(1) 266 .byte 0 # EOM(2) 267 .byte 0 # EOM(3) 268 .section .debug_info,"",@progbits 269.Lcu_begin0: 270 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 271.Ldebug_info_start0: 272 .short 5 # DWARF version number 273 .byte 1 # DWARF Unit Type 274 .byte 8 # Address Size (in bytes) 275 .long .debug_abbrev # Offset Into Abbrev. Section 276 .byte 1 # Abbrev [1] 0xc:0x83 DW_TAG_compile_unit 277 .byte 0 # DW_AT_producer 278 .short 33 # DW_AT_language 279 .byte 1 # DW_AT_name 280 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base 281 .long .Lline_table_start0 # DW_AT_stmt_list 282 .byte 2 # DW_AT_comp_dir 283 .byte 1 # DW_AT_low_pc 284 .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc 285 .long .Laddr_table_base0 # DW_AT_addr_base 286 .long .Lloclists_table_base0 # DW_AT_loclists_base 287 .byte 2 # Abbrev [2] 0x27:0xb DW_TAG_variable 288 .byte 3 # DW_AT_name 289 .long 39 # DW_AT_type 290 # DW_AT_external 291 .byte 0 # DW_AT_decl_file 292 .byte 1 # DW_AT_decl_line 293 .byte 3 # Abbrev [3] 0x32:0x4 DW_TAG_base_type 294 .byte 4 # DW_AT_name 295 .byte 5 # DW_AT_encoding 296 .byte 4 # DW_AT_byte_size 297 .byte 4 # Abbrev [4] 0x36:0x14 DW_TAG_subprogram 298 .byte 1 # DW_AT_low_pc 299 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 300 .byte 1 # DW_AT_frame_base 301 .byte 87 302 # DW_AT_call_all_calls 303 .long 74 # DW_AT_abstract_origin 304 .byte 5 # Abbrev [5] 0x42:0x7 DW_TAG_formal_parameter 305 .long 74 # DW_AT_abstract_origin 306 .byte 0 # End Of Children Mark 307 .byte 6 # Abbrev [6] 0x4a:0xe DW_TAG_subprogram 308 .byte 5 # DW_AT_linkage_name 309 .byte 6 # DW_AT_name 310 .byte 0 # DW_AT_decl_file 311 .byte 2 # DW_AT_decl_line 312 # DW_AT_external 313 # DW_AT_inline 314 .byte 7 # Abbrev [7] 0x4f:0x8 DW_TAG_formal_parameter 315 .byte 7 # DW_AT_name 316 .byte 0 # DW_AT_decl_file 317 .byte 2 # DW_AT_decl_line 318 .long 88 # DW_AT_type 319 .byte 0 # End Of Children Mark 320 .byte 8 # Abbrev [8] 0x58:0x5 DW_TAG_pointer_type 321 .long 39 # DW_AT_type 322 .byte 9 # Abbrev [9] 0x5d:0x31 DW_TAG_subprogram 323 .byte 2 # DW_AT_low_pc 324 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc 325 .byte 1 # DW_AT_frame_base 326 .byte 87 327 # DW_AT_call_all_calls 328 .byte 8 # DW_AT_linkage_name 329 .byte 9 # DW_AT_name 330 .byte 0 # DW_AT_decl_file 331 .byte 6 # DW_AT_decl_line 332 .long 39 # DW_AT_type 333 # DW_AT_external 334 .byte 10 # Abbrev [10] 0x6d:0xa DW_TAG_formal_parameter 335 .byte 10 # DW_AT_name 336 .byte 0 # DW_AT_decl_file 337 .byte 6 # DW_AT_decl_line 338 .long 39 # DW_AT_type 339 .byte 11 # Abbrev [11] 0x77:0x9 DW_TAG_variable 340 .byte 7 # DW_AT_name 341 .byte 0 # DW_AT_decl_file 342 .byte 7 # DW_AT_decl_line 343 .long 39 # DW_AT_type 344 .byte 12 # Abbrev [12] 0x80:0xd DW_TAG_inlined_subroutine 345 .long 74 # DW_AT_abstract_origin 346 .byte 2 # DW_AT_low_pc 347 .long .Ltmp1-.Lfunc_begin1 # DW_AT_high_pc 348 .byte 0 # DW_AT_call_file 349 .byte 8 # DW_AT_call_line 350 .byte 4 # DW_AT_call_column 351 .byte 0 # End Of Children Mark 352 .byte 0 # End Of Children Mark 353.Ldebug_info_end0: 354 .section .debug_str_offsets,"",@progbits 355 .long 48 # Length of String Offsets Set 356 .short 5 357 .short 0 358.Lstr_offsets_base0: 359 .section .debug_str,"MS",@progbits,1 360.Linfo_string0: 361 .asciz "clang version 15.0.0)" # string offset=0 362.Linfo_string1: 363 .asciz "foo.cpp" # string offset=134 364.Linfo_string2: 365 .asciz "/testLocListMultiple" # string offset=142 366.Linfo_string3: 367 .asciz "fooVar" # string offset=199 368.Linfo_string4: 369 .asciz "int" # string offset=206 370.Linfo_string5: 371 .asciz "_Z6useFooPi" # string offset=210 372.Linfo_string6: 373 .asciz "useFoo" # string offset=222 374.Linfo_string7: 375 .asciz "x" # string offset=229 376.Linfo_string8: 377 .asciz "_Z3fooi" # string offset=231 378.Linfo_string9: 379 .asciz "foo" # string offset=239 380.Linfo_string10: 381 .asciz "argc" # string offset=243 382 .section .debug_str_offsets,"",@progbits 383 .long .Linfo_string0 384 .long .Linfo_string1 385 .long .Linfo_string2 386 .long .Linfo_string3 387 .long .Linfo_string4 388 .long .Linfo_string5 389 .long .Linfo_string6 390 .long .Linfo_string7 391 .long .Linfo_string8 392 .long .Linfo_string9 393 .long .Linfo_string10 394 .section .debug_addr,"",@progbits 395 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 396.Ldebug_addr_start0: 397 .short 5 # DWARF version number 398 .byte 8 # Address size 399 .byte 0 # Segment selector size 400.Laddr_table_base0: 401 .quad fooVar 402 .quad .Lfunc_begin0 403 .quad .Lfunc_begin1 404.Ldebug_addr_end0: 405 .ident "clang version 15.0.0" 406 .section ".note.GNU-stack","",@progbits 407 .addrsig 408 .section .debug_line,"",@progbits 409.Lline_table_start0: 410