479 lines · plain
1# -g2 -gdwarf-4 main.cpp -O12# static int helper(int i) {3# return ++i;4# }5# void may_not_exist(void) __attribute__ ((weak));6# int main(int argc, char *argv[]) {7# if (may_not_exist)8# may_not_exist();9# int j = 0;10# [[clang::always_inline]] j = helper(argc);11# return j;12# }13 14 .text15 .file "main.cpp"16 .globl main # -- Begin function main17 .p2align 4, 0x9018 .type main,@function19main: # @main20.Lfunc_begin0:21 .file 0 "." "main.cpp" md5 0x375df0e93c6d762413bfe2708333ecaf22 .loc 0 5 0 # main.cpp:5:023 .cfi_startproc24# %bb.0: # %entry25 #DEBUG_VALUE: main:argc <- $edi26 #DEBUG_VALUE: main:argv <- $rsi27 pushq %rbx28 .cfi_def_cfa_offset 1629 .cfi_offset %rbx, -1630 movl %edi, %ebx31.Ltmp0:32 .loc 0 6 7 prologue_end # main.cpp:6:733 cmpq $0, _Z13may_not_existv@GOTPCREL(%rip)34 je .LBB0_235.Ltmp1:36# %bb.1: # %if.then37 #DEBUG_VALUE: main:argc <- $ebx38 #DEBUG_VALUE: main:argv <- $rsi39 .loc 0 7 5 # main.cpp:7:540 callq _Z13may_not_existv@PLT41.Ltmp2:42 #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rsi43.LBB0_2: # %if.end44 #DEBUG_VALUE: main:argc <- $ebx45 #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rsi46 #DEBUG_VALUE: main:j <- 047 #DEBUG_VALUE: helper:i <- $ebx48 .loc 0 2 10 # main.cpp:2:1049 incl %ebx50.Ltmp3:51 #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $edi52 #DEBUG_VALUE: helper:i <- $ebx53 #DEBUG_VALUE: main:j <- $ebx54 .loc 0 10 3 # main.cpp:10:355 movl %ebx, %eax56 .loc 0 10 3 epilogue_begin is_stmt 0 # main.cpp:10:357 popq %rbx58.Ltmp4:59 #DEBUG_VALUE: helper:i <- $eax60 #DEBUG_VALUE: main:j <- $eax61 .cfi_def_cfa_offset 862 retq63.Ltmp5:64.Lfunc_end0:65 .size main, .Lfunc_end0-main66 .cfi_endproc67 # -- End function68 .section .debug_loclists,"",@progbits69 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length70.Ldebug_list_header_start0:71 .short 5 # Version72 .byte 8 # Address size73 .byte 0 # Segment selector size74 .long 3 # Offset entry count75.Lloclists_table_base0:76 .long .Ldebug_loc0-.Lloclists_table_base077 .long .Ldebug_loc1-.Lloclists_table_base078 .long .Ldebug_loc2-.Lloclists_table_base079.Ldebug_loc0:80 .byte 4 # DW_LLE_offset_pair81 .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset82 .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset83 .byte 1 # Loc expr size84 .byte 85 # super-register DW_OP_reg585 .byte 4 # DW_LLE_offset_pair86 .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset87 .uleb128 .Ltmp3-.Lfunc_begin0 # ending offset88 .byte 1 # Loc expr size89 .byte 83 # super-register DW_OP_reg390 .byte 4 # DW_LLE_offset_pair91 .uleb128 .Ltmp3-.Lfunc_begin0 # starting offset92 .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset93 .byte 4 # Loc expr size94 .byte 163 # DW_OP_entry_value95 .byte 1 # 196 .byte 85 # super-register DW_OP_reg597 .byte 159 # DW_OP_stack_value98 .byte 0 # DW_LLE_end_of_list99.Ldebug_loc1:100 .byte 4 # DW_LLE_offset_pair101 .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset102 .uleb128 .Ltmp2-.Lfunc_begin0 # ending offset103 .byte 1 # Loc expr size104 .byte 84 # DW_OP_reg4105 .byte 4 # DW_LLE_offset_pair106 .uleb128 .Ltmp2-.Lfunc_begin0 # starting offset107 .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset108 .byte 4 # Loc expr size109 .byte 163 # DW_OP_entry_value110 .byte 1 # 1111 .byte 84 # DW_OP_reg4112 .byte 159 # DW_OP_stack_value113 .byte 0 # DW_LLE_end_of_list114.Ldebug_loc2:115 .byte 4 # DW_LLE_offset_pair116 .uleb128 .Ltmp2-.Lfunc_begin0 # starting offset117 .uleb128 .Ltmp3-.Lfunc_begin0 # ending offset118 .byte 3 # Loc expr size119 .byte 17 # DW_OP_consts120 .byte 0 # 0121 .byte 159 # DW_OP_stack_value122 .byte 4 # DW_LLE_offset_pair123 .uleb128 .Ltmp3-.Lfunc_begin0 # starting offset124 .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset125 .byte 1 # Loc expr size126 .byte 83 # super-register DW_OP_reg3127 .byte 4 # DW_LLE_offset_pair128 .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset129 .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset130 .byte 1 # Loc expr size131 .byte 80 # super-register DW_OP_reg0132 .byte 0 # DW_LLE_end_of_list133.Ldebug_list_header_end0:134 .section .debug_abbrev,"",@progbits135 .byte 1 # Abbreviation Code136 .byte 17 # DW_TAG_compile_unit137 .byte 1 # DW_CHILDREN_yes138 .byte 37 # DW_AT_producer139 .byte 37 # DW_FORM_strx1140 .byte 19 # DW_AT_language141 .byte 5 # DW_FORM_data2142 .byte 3 # DW_AT_name143 .byte 37 # DW_FORM_strx1144 .byte 114 # DW_AT_str_offsets_base145 .byte 23 # DW_FORM_sec_offset146 .byte 16 # DW_AT_stmt_list147 .byte 23 # DW_FORM_sec_offset148 .byte 27 # DW_AT_comp_dir149 .byte 37 # DW_FORM_strx1150 .byte 17 # DW_AT_low_pc151 .byte 27 # DW_FORM_addrx152 .byte 18 # DW_AT_high_pc153 .byte 6 # DW_FORM_data4154 .byte 115 # DW_AT_addr_base155 .byte 23 # DW_FORM_sec_offset156 .ascii "\214\001" # DW_AT_loclists_base157 .byte 23 # DW_FORM_sec_offset158 .byte 0 # EOM(1)159 .byte 0 # EOM(2)160 .byte 2 # Abbreviation Code161 .byte 46 # DW_TAG_subprogram162 .byte 1 # DW_CHILDREN_yes163 .byte 110 # DW_AT_linkage_name164 .byte 37 # DW_FORM_strx1165 .byte 3 # DW_AT_name166 .byte 37 # DW_FORM_strx1167 .byte 58 # DW_AT_decl_file168 .byte 11 # DW_FORM_data1169 .byte 59 # DW_AT_decl_line170 .byte 11 # DW_FORM_data1171 .byte 73 # DW_AT_type172 .byte 19 # DW_FORM_ref4173 .byte 32 # DW_AT_inline174 .byte 33 # DW_FORM_implicit_const175 .byte 1176 .byte 0 # EOM(1)177 .byte 0 # EOM(2)178 .byte 3 # Abbreviation Code179 .byte 5 # DW_TAG_formal_parameter180 .byte 0 # DW_CHILDREN_no181 .byte 3 # DW_AT_name182 .byte 37 # DW_FORM_strx1183 .byte 58 # DW_AT_decl_file184 .byte 11 # DW_FORM_data1185 .byte 59 # DW_AT_decl_line186 .byte 11 # DW_FORM_data1187 .byte 73 # DW_AT_type188 .byte 19 # DW_FORM_ref4189 .byte 0 # EOM(1)190 .byte 0 # EOM(2)191 .byte 4 # Abbreviation Code192 .byte 36 # DW_TAG_base_type193 .byte 0 # DW_CHILDREN_no194 .byte 3 # DW_AT_name195 .byte 37 # DW_FORM_strx1196 .byte 62 # DW_AT_encoding197 .byte 11 # DW_FORM_data1198 .byte 11 # DW_AT_byte_size199 .byte 11 # DW_FORM_data1200 .byte 0 # EOM(1)201 .byte 0 # EOM(2)202 .byte 5 # Abbreviation Code203 .byte 46 # DW_TAG_subprogram204 .byte 1 # DW_CHILDREN_yes205 .byte 17 # DW_AT_low_pc206 .byte 27 # DW_FORM_addrx207 .byte 18 # DW_AT_high_pc208 .byte 6 # DW_FORM_data4209 .byte 64 # DW_AT_frame_base210 .byte 24 # DW_FORM_exprloc211 .byte 122 # DW_AT_call_all_calls212 .byte 25 # DW_FORM_flag_present213 .byte 3 # DW_AT_name214 .byte 37 # DW_FORM_strx1215 .byte 58 # DW_AT_decl_file216 .byte 11 # DW_FORM_data1217 .byte 59 # DW_AT_decl_line218 .byte 11 # DW_FORM_data1219 .byte 73 # DW_AT_type220 .byte 19 # DW_FORM_ref4221 .byte 63 # DW_AT_external222 .byte 25 # DW_FORM_flag_present223 .byte 0 # EOM(1)224 .byte 0 # EOM(2)225 .byte 6 # Abbreviation Code226 .byte 5 # DW_TAG_formal_parameter227 .byte 0 # DW_CHILDREN_no228 .byte 2 # DW_AT_location229 .byte 34 # DW_FORM_loclistx230 .byte 3 # DW_AT_name231 .byte 37 # DW_FORM_strx1232 .byte 58 # DW_AT_decl_file233 .byte 11 # DW_FORM_data1234 .byte 59 # DW_AT_decl_line235 .byte 11 # DW_FORM_data1236 .byte 73 # DW_AT_type237 .byte 19 # DW_FORM_ref4238 .byte 0 # EOM(1)239 .byte 0 # EOM(2)240 .byte 7 # Abbreviation Code241 .byte 52 # DW_TAG_variable242 .byte 0 # DW_CHILDREN_no243 .byte 2 # DW_AT_location244 .byte 34 # DW_FORM_loclistx245 .byte 3 # DW_AT_name246 .byte 37 # DW_FORM_strx1247 .byte 58 # DW_AT_decl_file248 .byte 11 # DW_FORM_data1249 .byte 59 # DW_AT_decl_line250 .byte 11 # DW_FORM_data1251 .byte 73 # DW_AT_type252 .byte 19 # DW_FORM_ref4253 .byte 0 # EOM(1)254 .byte 0 # EOM(2)255 .byte 8 # Abbreviation Code256 .byte 29 # DW_TAG_inlined_subroutine257 .byte 1 # DW_CHILDREN_yes258 .byte 49 # DW_AT_abstract_origin259 .byte 19 # DW_FORM_ref4260 .byte 17 # DW_AT_low_pc261 .byte 27 # DW_FORM_addrx262 .byte 18 # DW_AT_high_pc263 .byte 6 # DW_FORM_data4264 .byte 88 # DW_AT_call_file265 .byte 11 # DW_FORM_data1266 .byte 89 # DW_AT_call_line267 .byte 11 # DW_FORM_data1268 .byte 87 # DW_AT_call_column269 .byte 11 # DW_FORM_data1270 .byte 0 # EOM(1)271 .byte 0 # EOM(2)272 .byte 9 # Abbreviation Code273 .byte 5 # DW_TAG_formal_parameter274 .byte 0 # DW_CHILDREN_no275 .byte 2 # DW_AT_location276 .byte 24 # DW_FORM_exprloc277 .byte 49 # DW_AT_abstract_origin278 .byte 19 # DW_FORM_ref4279 .byte 0 # EOM(1)280 .byte 0 # EOM(2)281 .byte 10 # Abbreviation Code282 .byte 72 # DW_TAG_call_site283 .byte 0 # DW_CHILDREN_no284 .byte 127 # DW_AT_call_origin285 .byte 19 # DW_FORM_ref4286 .byte 125 # DW_AT_call_return_pc287 .byte 27 # DW_FORM_addrx288 .byte 0 # EOM(1)289 .byte 0 # EOM(2)290 .byte 11 # Abbreviation Code291 .byte 46 # DW_TAG_subprogram292 .byte 0 # DW_CHILDREN_no293 .byte 110 # DW_AT_linkage_name294 .byte 37 # DW_FORM_strx1295 .byte 3 # DW_AT_name296 .byte 37 # DW_FORM_strx1297 .byte 58 # DW_AT_decl_file298 .byte 11 # DW_FORM_data1299 .byte 59 # DW_AT_decl_line300 .byte 11 # DW_FORM_data1301 .byte 60 # DW_AT_declaration302 .byte 25 # DW_FORM_flag_present303 .byte 63 # DW_AT_external304 .byte 25 # DW_FORM_flag_present305 .byte 0 # EOM(1)306 .byte 0 # EOM(2)307 .byte 12 # Abbreviation Code308 .byte 15 # DW_TAG_pointer_type309 .byte 0 # DW_CHILDREN_no310 .byte 73 # DW_AT_type311 .byte 19 # DW_FORM_ref4312 .byte 0 # EOM(1)313 .byte 0 # EOM(2)314 .byte 0 # EOM(3)315 .section .debug_info,"",@progbits316.Lcu_begin0:317 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit318.Ldebug_info_start0:319 .short 5 # DWARF version number320 .byte 1 # DWARF Unit Type321 .byte 8 # Address Size (in bytes)322 .long .debug_abbrev # Offset Into Abbrev. Section323 .byte 1 # Abbrev [1] 0xc:0x8b DW_TAG_compile_unit324 .byte 0 # DW_AT_producer325 .short 33 # DW_AT_language326 .byte 1 # DW_AT_name327 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base328 .long .Lline_table_start0 # DW_AT_stmt_list329 .byte 2 # DW_AT_comp_dir330 .byte 0 # DW_AT_low_pc331 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc332 .long .Laddr_table_base0 # DW_AT_addr_base333 .long .Lloclists_table_base0 # DW_AT_loclists_base334 .byte 2 # Abbrev [2] 0x27:0x12 DW_TAG_subprogram335 .byte 3 # DW_AT_linkage_name336 .byte 4 # DW_AT_name337 .byte 0 # DW_AT_decl_file338 .byte 1 # DW_AT_decl_line339 .long 57 # DW_AT_type340 # DW_AT_inline341 .byte 3 # Abbrev [3] 0x30:0x8 DW_TAG_formal_parameter342 .byte 6 # DW_AT_name343 .byte 0 # DW_AT_decl_file344 .byte 1 # DW_AT_decl_line345 .long 57 # DW_AT_type346 .byte 0 # End Of Children Mark347 .byte 4 # Abbrev [4] 0x39:0x4 DW_TAG_base_type348 .byte 5 # DW_AT_name349 .byte 5 # DW_AT_encoding350 .byte 4 # DW_AT_byte_size351 .byte 5 # Abbrev [5] 0x3d:0x46 DW_TAG_subprogram352 .byte 0 # DW_AT_low_pc353 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc354 .byte 1 # DW_AT_frame_base355 .byte 87356 # DW_AT_call_all_calls357 .byte 9 # DW_AT_name358 .byte 0 # DW_AT_decl_file359 .byte 5 # DW_AT_decl_line360 .long 57 # DW_AT_type361 # DW_AT_external362 .byte 6 # Abbrev [6] 0x4c:0x9 DW_TAG_formal_parameter363 .byte 0 # DW_AT_location364 .byte 10 # DW_AT_name365 .byte 0 # DW_AT_decl_file366 .byte 5 # DW_AT_decl_line367 .long 57 # DW_AT_type368 .byte 6 # Abbrev [6] 0x55:0x9 DW_TAG_formal_parameter369 .byte 1 # DW_AT_location370 .byte 11 # DW_AT_name371 .byte 0 # DW_AT_decl_file372 .byte 5 # DW_AT_decl_line373 .long 136 # DW_AT_type374 .byte 7 # Abbrev [7] 0x5e:0x9 DW_TAG_variable375 .byte 2 # DW_AT_location376 .byte 13 # DW_AT_name377 .byte 0 # DW_AT_decl_file378 .byte 8 # DW_AT_decl_line379 .long 57 # DW_AT_type380 .byte 8 # Abbrev [8] 0x67:0x15 DW_TAG_inlined_subroutine381 .long 39 # DW_AT_abstract_origin382 .byte 1 # DW_AT_low_pc383 .long .Ltmp3-.Ltmp2 # DW_AT_high_pc384 .byte 0 # DW_AT_call_file385 .byte 9 # DW_AT_call_line386 .byte 32 # DW_AT_call_column387 .byte 9 # Abbrev [9] 0x74:0x7 DW_TAG_formal_parameter388 .byte 1 # DW_AT_location389 .byte 83390 .long 48 # DW_AT_abstract_origin391 .byte 0 # End Of Children Mark392 .byte 10 # Abbrev [10] 0x7c:0x6 DW_TAG_call_site393 .long 131 # DW_AT_call_origin394 .byte 1 # DW_AT_call_return_pc395 .byte 0 # End Of Children Mark396 .byte 11 # Abbrev [11] 0x83:0x5 DW_TAG_subprogram397 .byte 7 # DW_AT_linkage_name398 .byte 8 # DW_AT_name399 .byte 0 # DW_AT_decl_file400 .byte 4 # DW_AT_decl_line401 # DW_AT_declaration402 # DW_AT_external403 .byte 12 # Abbrev [12] 0x88:0x5 DW_TAG_pointer_type404 .long 141 # DW_AT_type405 .byte 12 # Abbrev [12] 0x8d:0x5 DW_TAG_pointer_type406 .long 146 # DW_AT_type407 .byte 4 # Abbrev [4] 0x92:0x4 DW_TAG_base_type408 .byte 12 # DW_AT_name409 .byte 6 # DW_AT_encoding410 .byte 1 # DW_AT_byte_size411 .byte 0 # End Of Children Mark412.Ldebug_info_end0:413 .section .debug_str_offsets,"",@progbits414 .long 60 # Length of String Offsets Set415 .short 5416 .short 0417.Lstr_offsets_base0:418 .section .debug_str,"MS",@progbits,1419.Linfo_string0:420 .asciz "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=0421.Linfo_string1:422 .asciz "main.cpp" # string offset=105423.Linfo_string2:424 .asciz "." # string offset=114425.Linfo_string3:426 .asciz "_ZL6helperi" # string offset=152427.Linfo_string4:428 .asciz "helper" # string offset=164429.Linfo_string5:430 .asciz "int" # string offset=171431.Linfo_string6:432 .asciz "i" # string offset=175433.Linfo_string7:434 .asciz "_Z13may_not_existv" # string offset=177435.Linfo_string8:436 .asciz "may_not_exist" # string offset=196437.Linfo_string9:438 .asciz "main" # string offset=210439.Linfo_string10:440 .asciz "argc" # string offset=215441.Linfo_string11:442 .asciz "argv" # string offset=220443.Linfo_string12:444 .asciz "char" # string offset=225445.Linfo_string13:446 .asciz "j" # string offset=230447 .section .debug_str_offsets,"",@progbits448 .long .Linfo_string0449 .long .Linfo_string1450 .long .Linfo_string2451 .long .Linfo_string3452 .long .Linfo_string4453 .long .Linfo_string5454 .long .Linfo_string6455 .long .Linfo_string7456 .long .Linfo_string8457 .long .Linfo_string9458 .long .Linfo_string10459 .long .Linfo_string11460 .long .Linfo_string12461 .long .Linfo_string13462 .section .debug_addr,"",@progbits463 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution464.Ldebug_addr_start0:465 .short 5 # DWARF version number466 .byte 8 # Address size467 .byte 0 # Segment selector size468.Laddr_table_base0:469 .quad .Lfunc_begin0470 .quad .Ltmp2471.Ldebug_addr_end0:472 .weak _Z13may_not_existv473 .ident "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)"474 .section ".note.GNU-stack","",@progbits475 .addrsig476 .addrsig_sym _Z13may_not_existv477 .section .debug_line,"",@progbits478.Lline_table_start0:479