385 lines · plain
1# clang++ main.cpp -g2 -O2 -S2# int helper(int z_, int d_);3# int x = 0;4# int y = 1;5# int main(int argc, char *argv[]) {6# return helper(x, y);7# }8 9# This file was manually modified so that DW_AT_call_pc points to invalid address.10 11 .text12 .file "main.cpp"13 .file 0 "." "main.cpp" md5 0xcd4b01475ec2d380058dc5a69f9dd74114 .globl main # -- Begin function main15 .p2align 4, 0x9016 .type main,@function17main: # @main18.Lfunc_begin0:19 .loc 0 4 0 # main.cpp:4:020 .cfi_startproc21# %bb.0: # %entry22 #DEBUG_VALUE: main:argc <- $edi23 #DEBUG_VALUE: main:argv <- $rsi24 .loc 0 5 17 prologue_end # main.cpp:5:1725 movl x(%rip), %edi26.Ltmp0:27 #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $edi28 .loc 0 5 20 is_stmt 0 # main.cpp:5:2029 movl y(%rip), %esi30.Ltmp1:31 #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rsi32 .loc 0 5 10 # main.cpp:5:1033 jmp _Z6helperii@PLT # TAILCALL34.Ltmp2:35.Lfunc_end0:36 .size main, .Lfunc_end0-main37 .cfi_endproc38 # -- End function39 .type x,@object # @x40 .bss41 .globl x42 .p2align 243x:44 .long 0 # 0x045 .size x, 446 47 .type y,@object # @y48 .data49 .globl y50 .p2align 251y:52 .long 1 # 0x153 .size y, 454 55 .section .debug_loclists,"",@progbits56 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length57.Ldebug_list_header_start0:58 .short 5 # Version59 .byte 8 # Address size60 .byte 0 # Segment selector size61 .long 2 # Offset entry count62.Lloclists_table_base0:63 .long .Ldebug_loc0-.Lloclists_table_base064 .long .Ldebug_loc1-.Lloclists_table_base065.Ldebug_loc0:66 .byte 4 # DW_LLE_offset_pair67 .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset68 .uleb128 .Ltmp0-.Lfunc_begin0 # ending offset69 .byte 1 # Loc expr size70 .byte 85 # super-register DW_OP_reg571 .byte 4 # DW_LLE_offset_pair72 .uleb128 .Ltmp0-.Lfunc_begin0 # starting offset73 .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset74 .byte 4 # Loc expr size75 .byte 163 # DW_OP_entry_value76 .byte 1 # 177 .byte 85 # super-register DW_OP_reg578 .byte 159 # DW_OP_stack_value79 .byte 0 # DW_LLE_end_of_list80.Ldebug_loc1:81 .byte 4 # DW_LLE_offset_pair82 .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset83 .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset84 .byte 1 # Loc expr size85 .byte 84 # DW_OP_reg486 .byte 4 # DW_LLE_offset_pair87 .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset88 .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset89 .byte 4 # Loc expr size90 .byte 163 # DW_OP_entry_value91 .byte 1 # 192 .byte 84 # DW_OP_reg493 .byte 159 # DW_OP_stack_value94 .byte 0 # DW_LLE_end_of_list95.Ldebug_list_header_end0:96 .section .debug_abbrev,"",@progbits97 .byte 1 # Abbreviation Code98 .byte 17 # DW_TAG_compile_unit99 .byte 1 # DW_CHILDREN_yes100 .byte 37 # DW_AT_producer101 .byte 37 # DW_FORM_strx1102 .byte 19 # DW_AT_language103 .byte 5 # DW_FORM_data2104 .byte 3 # DW_AT_name105 .byte 37 # DW_FORM_strx1106 .byte 114 # DW_AT_str_offsets_base107 .byte 23 # DW_FORM_sec_offset108 .byte 16 # DW_AT_stmt_list109 .byte 23 # DW_FORM_sec_offset110 .byte 27 # DW_AT_comp_dir111 .byte 37 # DW_FORM_strx1112 .byte 17 # DW_AT_low_pc113 .byte 27 # DW_FORM_addrx114 .byte 18 # DW_AT_high_pc115 .byte 6 # DW_FORM_data4116 .byte 115 # DW_AT_addr_base117 .byte 23 # DW_FORM_sec_offset118 .ascii "\214\001" # DW_AT_loclists_base119 .byte 23 # DW_FORM_sec_offset120 .byte 0 # EOM(1)121 .byte 0 # EOM(2)122 .byte 2 # Abbreviation Code123 .byte 52 # DW_TAG_variable124 .byte 0 # DW_CHILDREN_no125 .byte 3 # DW_AT_name126 .byte 37 # DW_FORM_strx1127 .byte 73 # DW_AT_type128 .byte 19 # DW_FORM_ref4129 .byte 63 # DW_AT_external130 .byte 25 # DW_FORM_flag_present131 .byte 58 # DW_AT_decl_file132 .byte 11 # DW_FORM_data1133 .byte 59 # DW_AT_decl_line134 .byte 11 # DW_FORM_data1135 .byte 2 # DW_AT_location136 .byte 24 # DW_FORM_exprloc137 .byte 0 # EOM(1)138 .byte 0 # EOM(2)139 .byte 3 # Abbreviation Code140 .byte 36 # DW_TAG_base_type141 .byte 0 # DW_CHILDREN_no142 .byte 3 # DW_AT_name143 .byte 37 # DW_FORM_strx1144 .byte 62 # DW_AT_encoding145 .byte 11 # DW_FORM_data1146 .byte 11 # DW_AT_byte_size147 .byte 11 # DW_FORM_data1148 .byte 0 # EOM(1)149 .byte 0 # EOM(2)150 .byte 4 # Abbreviation Code151 .byte 46 # DW_TAG_subprogram152 .byte 1 # DW_CHILDREN_yes153 .byte 17 # DW_AT_low_pc154 .byte 27 # DW_FORM_addrx155 .byte 18 # DW_AT_high_pc156 .byte 6 # DW_FORM_data4157 .byte 64 # DW_AT_frame_base158 .byte 24 # DW_FORM_exprloc159 .byte 122 # DW_AT_call_all_calls160 .byte 25 # DW_FORM_flag_present161 .byte 3 # DW_AT_name162 .byte 37 # DW_FORM_strx1163 .byte 58 # DW_AT_decl_file164 .byte 11 # DW_FORM_data1165 .byte 59 # DW_AT_decl_line166 .byte 11 # DW_FORM_data1167 .byte 73 # DW_AT_type168 .byte 19 # DW_FORM_ref4169 .byte 63 # DW_AT_external170 .byte 25 # DW_FORM_flag_present171 .byte 0 # EOM(1)172 .byte 0 # EOM(2)173 .byte 5 # Abbreviation Code174 .byte 5 # DW_TAG_formal_parameter175 .byte 0 # DW_CHILDREN_no176 .byte 2 # DW_AT_location177 .byte 34 # DW_FORM_loclistx178 .byte 3 # DW_AT_name179 .byte 37 # DW_FORM_strx1180 .byte 58 # DW_AT_decl_file181 .byte 11 # DW_FORM_data1182 .byte 59 # DW_AT_decl_line183 .byte 11 # DW_FORM_data1184 .byte 73 # DW_AT_type185 .byte 19 # DW_FORM_ref4186 .byte 0 # EOM(1)187 .byte 0 # EOM(2)188 .byte 6 # Abbreviation Code189 .byte 72 # DW_TAG_call_site190 .byte 0 # DW_CHILDREN_no191 .byte 127 # DW_AT_call_origin192 .byte 19 # DW_FORM_ref4193 .ascii "\202\001" # DW_AT_call_tail_call194 .byte 25 # DW_FORM_flag_present195 .ascii "\201\001" # DW_AT_call_pc196 .byte 27 # DW_FORM_addrx197 .byte 0 # EOM(1)198 .byte 0 # EOM(2)199 .byte 7 # Abbreviation Code200 .byte 46 # DW_TAG_subprogram201 .byte 1 # DW_CHILDREN_yes202 .byte 110 # DW_AT_linkage_name203 .byte 37 # DW_FORM_strx1204 .byte 3 # DW_AT_name205 .byte 37 # DW_FORM_strx1206 .byte 58 # DW_AT_decl_file207 .byte 11 # DW_FORM_data1208 .byte 59 # DW_AT_decl_line209 .byte 11 # DW_FORM_data1210 .byte 73 # DW_AT_type211 .byte 19 # DW_FORM_ref4212 .byte 60 # DW_AT_declaration213 .byte 25 # DW_FORM_flag_present214 .byte 63 # DW_AT_external215 .byte 25 # DW_FORM_flag_present216 .byte 0 # EOM(1)217 .byte 0 # EOM(2)218 .byte 8 # Abbreviation Code219 .byte 5 # DW_TAG_formal_parameter220 .byte 0 # DW_CHILDREN_no221 .byte 73 # DW_AT_type222 .byte 19 # DW_FORM_ref4223 .byte 0 # EOM(1)224 .byte 0 # EOM(2)225 .byte 9 # Abbreviation Code226 .byte 15 # DW_TAG_pointer_type227 .byte 0 # DW_CHILDREN_no228 .byte 73 # DW_AT_type229 .byte 19 # DW_FORM_ref4230 .byte 0 # EOM(1)231 .byte 0 # EOM(2)232 .byte 0 # EOM(3)233 .section .debug_info,"",@progbits234.Lcu_begin0:235 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit236.Ldebug_info_start0:237 .short 5 # DWARF version number238 .byte 1 # DWARF Unit Type239 .byte 8 # Address Size (in bytes)240 .long .debug_abbrev # Offset Into Abbrev. Section241 .byte 1 # Abbrev [1] 0xc:0x80 DW_TAG_compile_unit242 .byte 0 # DW_AT_producer243 .short 33 # DW_AT_language244 .byte 1 # DW_AT_name245 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base246 .long .Lline_table_start0 # DW_AT_stmt_list247 .byte 2 # DW_AT_comp_dir248 .byte 2 # DW_AT_low_pc249 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc250 .long .Laddr_table_base0 # DW_AT_addr_base251 .long .Lloclists_table_base0 # DW_AT_loclists_base252 .byte 2 # Abbrev [2] 0x27:0xb DW_TAG_variable253 .byte 3 # DW_AT_name254 .long 50 # DW_AT_type255 # DW_AT_external256 .byte 0 # DW_AT_decl_file257 .byte 2 # DW_AT_decl_line258 .byte 2 # DW_AT_location259 .byte 161260 .byte 0261 .byte 3 # Abbrev [3] 0x32:0x4 DW_TAG_base_type262 .byte 4 # DW_AT_name263 .byte 5 # DW_AT_encoding264 .byte 4 # DW_AT_byte_size265 .byte 2 # Abbrev [2] 0x36:0xb DW_TAG_variable266 .byte 5 # DW_AT_name267 .long 50 # DW_AT_type268 # DW_AT_external269 .byte 0 # DW_AT_decl_file270 .byte 3 # DW_AT_decl_line271 .byte 2 # DW_AT_location272 .byte 161273 .byte 1274 .byte 4 # Abbrev [4] 0x41:0x28 DW_TAG_subprogram275 .byte 2 # DW_AT_low_pc276 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc277 .byte 1 # DW_AT_frame_base278 .byte 87279 # DW_AT_call_all_calls280 .byte 8 # DW_AT_name281 .byte 0 # DW_AT_decl_file282 .byte 4 # DW_AT_decl_line283 .long 50 # DW_AT_type284 # DW_AT_external285 .byte 5 # Abbrev [5] 0x50:0x9 DW_TAG_formal_parameter286 .byte 0 # DW_AT_location287 .byte 9 # DW_AT_name288 .byte 0 # DW_AT_decl_file289 .byte 4 # DW_AT_decl_line290 .long 50 # DW_AT_type291 .byte 5 # Abbrev [5] 0x59:0x9 DW_TAG_formal_parameter292 .byte 1 # DW_AT_location293 .byte 10 # DW_AT_name294 .byte 0 # DW_AT_decl_file295 .byte 4 # DW_AT_decl_line296 .long 125 # DW_AT_type297 .byte 6 # Abbrev [6] 0x62:0x6 DW_TAG_call_site298 .long 105 # DW_AT_call_origin299 # DW_AT_call_tail_call300 .byte 3 # DW_AT_call_pc301 .byte 0 # End Of Children Mark302 .byte 7 # Abbrev [7] 0x69:0x14 DW_TAG_subprogram303 .byte 6 # DW_AT_linkage_name304 .byte 7 # DW_AT_name305 .byte 0 # DW_AT_decl_file306 .byte 1 # DW_AT_decl_line307 .long 50 # DW_AT_type308 # DW_AT_declaration309 # DW_AT_external310 .byte 8 # Abbrev [8] 0x72:0x5 DW_TAG_formal_parameter311 .long 50 # DW_AT_type312 .byte 8 # Abbrev [8] 0x77:0x5 DW_TAG_formal_parameter313 .long 50 # DW_AT_type314 .byte 0 # End Of Children Mark315 .byte 9 # Abbrev [9] 0x7d:0x5 DW_TAG_pointer_type316 .long 130 # DW_AT_type317 .byte 9 # Abbrev [9] 0x82:0x5 DW_TAG_pointer_type318 .long 135 # DW_AT_type319 .byte 3 # Abbrev [3] 0x87:0x4 DW_TAG_base_type320 .byte 11 # DW_AT_name321 .byte 6 # DW_AT_encoding322 .byte 1 # DW_AT_byte_size323 .byte 0 # End Of Children Mark324.Ldebug_info_end0:325 .section .debug_str_offsets,"",@progbits326 .long 52 # Length of String Offsets Set327 .short 5328 .short 0329.Lstr_offsets_base0:330 .section .debug_str,"MS",@progbits,1331.Linfo_string0:332 .asciz "clang version 16.0.0" # string offset=0333.Linfo_string1:334 .asciz "main.cpp" # string offset=134335.Linfo_string2:336 .asciz "." # string offset=143337.Linfo_string3:338 .asciz "x" # string offset=196339.Linfo_string4:340 .asciz "int" # string offset=198341.Linfo_string5:342 .asciz "y" # string offset=202343.Linfo_string6:344 .asciz "_Z6helperii" # string offset=204345.Linfo_string7:346 .asciz "helper" # string offset=216347.Linfo_string8:348 .asciz "main" # string offset=223349.Linfo_string9:350 .asciz "argc" # string offset=228351.Linfo_string10:352 .asciz "argv" # string offset=233353.Linfo_string11:354 .asciz "char" # string offset=238355 .section .debug_str_offsets,"",@progbits356 .long .Linfo_string0357 .long .Linfo_string1358 .long .Linfo_string2359 .long .Linfo_string3360 .long .Linfo_string4361 .long .Linfo_string5362 .long .Linfo_string6363 .long .Linfo_string7364 .long .Linfo_string8365 .long .Linfo_string9366 .long .Linfo_string10367 .long .Linfo_string11368 .section .debug_addr,"",@progbits369 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution370.Ldebug_addr_start0:371 .short 5 # DWARF version number372 .byte 8 # Address size373 .byte 0 # Segment selector size374.Laddr_table_base0:375 .quad x376 .quad y377 .quad .Lfunc_begin0378 .quad .Ltmp1 + 0x1000000 # Manually modified to add 0x1000000379.Ldebug_addr_end0:380 .ident "clang version 16.0.0"381 .section ".note.GNU-stack","",@progbits382 .addrsig383 .section .debug_line,"",@progbits384.Lline_table_start0:385