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