1/* This testcase is part of GDB, the GNU debugger. 2 3 Copyright 2014-2023 Free Software Foundation, Inc. 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 17 18/* This file is compiled from gdb.arch/amd64-entry-value-paramref.cc 19 using -g -dA -S -O2. 20 Additionally it has been patched. */ 21 22 .file "amd64-entry-value-paramref.cc" 23 .text 24.Ltext0: 25 .p2align 4,,15 26 .type _ZL3barRi.constprop.0, @function 27_ZL3barRi.constprop.0: 28.LFB2: 29 .file 1 "gdb.arch/amd64-entry-value-paramref.cc" 30 # gdb.arch/amd64-entry-value-paramref.cc:21 31 .loc 1 21 0 32 .cfi_startproc 33.LVL0: 34# BLOCK 2 freq:10000 seq:0 35# PRED: ENTRY [100.0%] (FALLTHRU) 36 # gdb.arch/amd64-entry-value-paramref.cc:23 37 .loc 1 23 0 38 movl vv(%rip), %eax 39 # gdb.arch/amd64-entry-value-paramref.cc:24 40 .loc 1 24 0 41 movq %rdi, p(%rip) 42 # gdb.arch/amd64-entry-value-paramref.cc:23 43 .loc 1 23 0 44 addl $1, %eax 45 movl %eax, vv(%rip) 46 # gdb.arch/amd64-entry-value-paramref.cc:25 47 .loc 1 25 0 48 movl (%rdi), %eax 49# SUCC: EXIT [100.0%] 50 # gdb.arch/amd64-entry-value-paramref.cc:26 51 .loc 1 26 0 52 ret 53 .cfi_endproc 54.LFE2: 55 .size _ZL3barRi.constprop.0, .-_ZL3barRi.constprop.0 56 .section .text.startup,"ax",@progbits 57 .p2align 4,,15 58 .globl main 59 .type main, @function 60main: 61.LFB1: 62 # gdb.arch/amd64-entry-value-paramref.cc:30 63 .loc 1 30 0 64 .cfi_startproc 65# BLOCK 2 freq:10000 seq:0 66# PRED: ENTRY [100.0%] (FALLTHRU) 67 subq $16, %rsp 68 .cfi_def_cfa_offset 24 69.LBB2: 70 # gdb.arch/amd64-entry-value-paramref.cc:32 71 .loc 1 32 0 72 leaq 12(%rsp), %rdi 73 # gdb.arch/amd64-entry-value-paramref.cc:31 74 .loc 1 31 0 75 movl $10, 12(%rsp) 76 # gdb.arch/amd64-entry-value-paramref.cc:32 77 .loc 1 32 0 78 call _ZL3barRi.constprop.0 79.LVL1: 80.LBE2: 81 # gdb.arch/amd64-entry-value-paramref.cc:33 82 .loc 1 33 0 83 addq $16, %rsp 84 .cfi_def_cfa_offset 8 85# SUCC: EXIT [100.0%] 86 ret 87 .cfi_endproc 88.LFE1: 89 .size main, .-main 90 .globl p 91 .bss 92 .align 8 93 .type p, @object 94 .size p, 8 95p: 96 .zero 8 97 .globl vv 98 .align 4 99 .type vv, @object 100 .size vv, 4 101vv: 102 .zero 4 103 .text 104.Letext0: 105 .section .debug_info,"",@progbits 106.Ldebug_info0: 107 .long .Linfo_end - .Linfo_start # Length of Compilation Unit Info 108.Linfo_start: 109 .value 0x4 # DWARF version number 110 .long .Ldebug_abbrev0 # Offset Into Abbrev. Section 111 .byte 0x8 # Pointer Size (in bytes) 112 .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit) 113 .long .LASF0 # DW_AT_producer: "GNU C++ 4.8.2 20131212 (Red Hat 4.8.2-7) -mtune=generic -march=x86-64 -g -O2" 114 .byte 0x4 # DW_AT_language 115 .long .LASF1 # DW_AT_name: "gdb.arch/amd64-entry-value-paramref.cc" 116 .long .LASF2 # DW_AT_comp_dir: "" 117 .long .Ldebug_ranges0+0 # DW_AT_ranges 118 .quad 0 # DW_AT_low_pc 119 .long .Ldebug_line0 # DW_AT_stmt_list 120DIE29: .uleb128 0x2 # (DIE (0x29) DW_TAG_subprogram) 121 .ascii "bar\0" # DW_AT_name 122 .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-paramref.cc) 123 .byte 0x15 # DW_AT_decl_line 124 .long DIE45 - .Ldebug_info0 # DW_AT_type 125 .byte 0x1 # DW_AT_inline 126DIE39: .uleb128 0x3 # (DIE (0x39) DW_TAG_formal_parameter) 127 .ascii "ref\0" # DW_AT_name 128 .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-paramref.cc) 129 .byte 0x15 # DW_AT_decl_line 130 .long DIE4c - .Ldebug_info0 # DW_AT_type 131 .byte 0 # end of children of DIE 0x29 132DIE45: .uleb128 0x4 # (DIE (0x45) DW_TAG_base_type) 133 .byte 0x4 # DW_AT_byte_size 134 .byte 0x5 # DW_AT_encoding 135 .ascii "int\0" # DW_AT_name 136DIE4c: .uleb128 0x5 # (DIE (0x4c) DW_TAG_const_type) 137 .long DIE51 - .Ldebug_info0 # DW_AT_type 138DIE51: .uleb128 0x6 # (DIE (0x51) DW_TAG_reference_type) 139 .byte 0x8 # DW_AT_byte_size 140 .long DIE45 - .Ldebug_info0 # DW_AT_type 141DIE57: .uleb128 0x7 # (DIE (0x57) DW_TAG_subprogram) 142 .long DIE29 - .Ldebug_info0 # DW_AT_abstract_origin 143 .quad .LFB2 # DW_AT_low_pc 144 .quad .LFE2-.LFB2 # DW_AT_high_pc 145 .uleb128 0x1 # DW_AT_frame_base 146 .byte 0x9c # DW_OP_call_frame_cfa 147 # DW_AT_GNU_all_call_sites 148DIE72: .uleb128 0x8 # (DIE (0x72) DW_TAG_formal_parameter) 149 .long DIE39 - .Ldebug_info0 # DW_AT_abstract_origin 150 .uleb128 0x1 # DW_AT_location 151 .byte 0x55 # DW_OP_reg5 152 .byte 0 # end of children of DIE 0x57 153DIE7a: .uleb128 0x9 # (DIE (0x7a) DW_TAG_subprogram) 154 # DW_AT_external 155 .long .LASF3 # DW_AT_name: "main" 156 .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-paramref.cc) 157 .byte 0x1d # DW_AT_decl_line 158 .long DIE45 - .Ldebug_info0 # DW_AT_type 159 .quad .LFB1 # DW_AT_low_pc 160 .quad .LFE1-.LFB1 # DW_AT_high_pc 161 .uleb128 0x1 # DW_AT_frame_base 162 .byte 0x9c # DW_OP_call_frame_cfa 163 # DW_AT_GNU_all_call_sites 164DIE9b: .uleb128 0xa # (DIE (0x9b) DW_TAG_lexical_block) 165 .quad .LBB2 # DW_AT_low_pc 166 .quad .LBE2-.LBB2 # DW_AT_high_pc 167DIEac: .uleb128 0xb # (DIE (0xac) DW_TAG_variable) 168 .ascii "var\0" # DW_AT_name 169 .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-paramref.cc) 170 .byte 0x1f # DW_AT_decl_line 171 .long DIE45 - .Ldebug_info0 # DW_AT_type 172 .uleb128 0x2 # DW_AT_location 173 .byte 0x91 # DW_OP_fbreg 174 .sleb128 -12 175DIEba: .uleb128 0xc # (DIE (0xba) DW_TAG_GNU_call_site) 176 .quad .LVL1 # DW_AT_low_pc 177 .long DIE57 - .Ldebug_info0 # DW_AT_abstract_origin 178DIEc7: .uleb128 0xd # (DIE (0xc7) DW_TAG_GNU_call_site_parameter) 179 .uleb128 0x1 # DW_AT_location 180 .byte 0x55 # DW_OP_reg5 181 .uleb128 0x2 # DW_AT_GNU_call_site_value 182 .byte 0x91 # DW_OP_fbreg 183 .sleb128 -12 184#if 0 185 .uleb128 0x1 # DW_AT_GNU_call_site_data_value 186 .byte 0x3a # DW_OP_lit10 187#else 188 .uleb128 1f - 2f # DW_AT_GNU_call_site_data_value 1892: 190 .byte 0xf3 # DW_OP_GNU_entry_value 191 .uleb128 1f - 3f 1923: 193 .byte 0x55 # DW_OP_reg5 1941: 195#endif 196 .byte 0 # end of children of DIE 0xba 197 .byte 0 # end of children of DIE 0x9b 198 .byte 0 # end of children of DIE 0x7a 199DIEd2: .uleb128 0xe # (DIE (0xd2) DW_TAG_variable) 200 .ascii "vv\0" # DW_AT_name 201 .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-paramref.cc) 202 .byte 0x12 # DW_AT_decl_line 203 .long DIEe6 - .Ldebug_info0 # DW_AT_type 204 # DW_AT_external 205 .uleb128 0x9 # DW_AT_location 206 .byte 0x3 # DW_OP_addr 207 .quad vv 208DIEe6: .uleb128 0xf # (DIE (0xe6) DW_TAG_volatile_type) 209 .long DIE45 - .Ldebug_info0 # DW_AT_type 210DIEeb: .uleb128 0xe # (DIE (0xeb) DW_TAG_variable) 211 .ascii "p\0" # DW_AT_name 212 .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-paramref.cc) 213 .byte 0x12 # DW_AT_decl_line 214 .long DIEfe - .Ldebug_info0 # DW_AT_type 215 # DW_AT_external 216 .uleb128 0x9 # DW_AT_location 217 .byte 0x3 # DW_OP_addr 218 .quad p 219DIEfe: .uleb128 0x10 # (DIE (0xfe) DW_TAG_pointer_type) 220 .byte 0x8 # DW_AT_byte_size 221 .long DIEe6 - .Ldebug_info0 # DW_AT_type 222 .byte 0 # end of children of DIE 0xb 223.Linfo_end: 224 .section .debug_abbrev,"",@progbits 225.Ldebug_abbrev0: 226 .uleb128 0x1 # (abbrev code) 227 .uleb128 0x11 # (TAG: DW_TAG_compile_unit) 228 .byte 0x1 # DW_children_yes 229 .uleb128 0x25 # (DW_AT_producer) 230 .uleb128 0xe # (DW_FORM_strp) 231 .uleb128 0x13 # (DW_AT_language) 232 .uleb128 0xb # (DW_FORM_data1) 233 .uleb128 0x3 # (DW_AT_name) 234 .uleb128 0xe # (DW_FORM_strp) 235 .uleb128 0x1b # (DW_AT_comp_dir) 236 .uleb128 0xe # (DW_FORM_strp) 237 .uleb128 0x55 # (DW_AT_ranges) 238 .uleb128 0x17 # (DW_FORM_sec_offset) 239 .uleb128 0x11 # (DW_AT_low_pc) 240 .uleb128 0x1 # (DW_FORM_addr) 241 .uleb128 0x10 # (DW_AT_stmt_list) 242 .uleb128 0x17 # (DW_FORM_sec_offset) 243 .byte 0 244 .byte 0 245 .uleb128 0x2 # (abbrev code) 246 .uleb128 0x2e # (TAG: DW_TAG_subprogram) 247 .byte 0x1 # DW_children_yes 248 .uleb128 0x3 # (DW_AT_name) 249 .uleb128 0x8 # (DW_FORM_string) 250 .uleb128 0x3a # (DW_AT_decl_file) 251 .uleb128 0xb # (DW_FORM_data1) 252 .uleb128 0x3b # (DW_AT_decl_line) 253 .uleb128 0xb # (DW_FORM_data1) 254 .uleb128 0x49 # (DW_AT_type) 255 .uleb128 0x13 # (DW_FORM_ref4) 256 .uleb128 0x20 # (DW_AT_inline) 257 .uleb128 0xb # (DW_FORM_data1) 258 .byte 0 259 .byte 0 260 .uleb128 0x3 # (abbrev code) 261 .uleb128 0x5 # (TAG: DW_TAG_formal_parameter) 262 .byte 0 # DW_children_no 263 .uleb128 0x3 # (DW_AT_name) 264 .uleb128 0x8 # (DW_FORM_string) 265 .uleb128 0x3a # (DW_AT_decl_file) 266 .uleb128 0xb # (DW_FORM_data1) 267 .uleb128 0x3b # (DW_AT_decl_line) 268 .uleb128 0xb # (DW_FORM_data1) 269 .uleb128 0x49 # (DW_AT_type) 270 .uleb128 0x13 # (DW_FORM_ref4) 271 .byte 0 272 .byte 0 273 .uleb128 0x4 # (abbrev code) 274 .uleb128 0x24 # (TAG: DW_TAG_base_type) 275 .byte 0 # DW_children_no 276 .uleb128 0xb # (DW_AT_byte_size) 277 .uleb128 0xb # (DW_FORM_data1) 278 .uleb128 0x3e # (DW_AT_encoding) 279 .uleb128 0xb # (DW_FORM_data1) 280 .uleb128 0x3 # (DW_AT_name) 281 .uleb128 0x8 # (DW_FORM_string) 282 .byte 0 283 .byte 0 284 .uleb128 0x5 # (abbrev code) 285 .uleb128 0x26 # (TAG: DW_TAG_const_type) 286 .byte 0 # DW_children_no 287 .uleb128 0x49 # (DW_AT_type) 288 .uleb128 0x13 # (DW_FORM_ref4) 289 .byte 0 290 .byte 0 291 .uleb128 0x6 # (abbrev code) 292 .uleb128 0x10 # (TAG: DW_TAG_reference_type) 293 .byte 0 # DW_children_no 294 .uleb128 0xb # (DW_AT_byte_size) 295 .uleb128 0xb # (DW_FORM_data1) 296 .uleb128 0x49 # (DW_AT_type) 297 .uleb128 0x13 # (DW_FORM_ref4) 298 .byte 0 299 .byte 0 300 .uleb128 0x7 # (abbrev code) 301 .uleb128 0x2e # (TAG: DW_TAG_subprogram) 302 .byte 0x1 # DW_children_yes 303 .uleb128 0x31 # (DW_AT_abstract_origin) 304 .uleb128 0x13 # (DW_FORM_ref4) 305 .uleb128 0x11 # (DW_AT_low_pc) 306 .uleb128 0x1 # (DW_FORM_addr) 307 .uleb128 0x12 # (DW_AT_high_pc) 308 .uleb128 0x7 # (DW_FORM_data8) 309 .uleb128 0x40 # (DW_AT_frame_base) 310 .uleb128 0x18 # (DW_FORM_exprloc) 311 .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) 312 .uleb128 0x19 # (DW_FORM_flag_present) 313 .byte 0 314 .byte 0 315 .uleb128 0x8 # (abbrev code) 316 .uleb128 0x5 # (TAG: DW_TAG_formal_parameter) 317 .byte 0 # DW_children_no 318 .uleb128 0x31 # (DW_AT_abstract_origin) 319 .uleb128 0x13 # (DW_FORM_ref4) 320 .uleb128 0x2 # (DW_AT_location) 321 .uleb128 0x18 # (DW_FORM_exprloc) 322 .byte 0 323 .byte 0 324 .uleb128 0x9 # (abbrev code) 325 .uleb128 0x2e # (TAG: DW_TAG_subprogram) 326 .byte 0x1 # DW_children_yes 327 .uleb128 0x3f # (DW_AT_external) 328 .uleb128 0x19 # (DW_FORM_flag_present) 329 .uleb128 0x3 # (DW_AT_name) 330 .uleb128 0xe # (DW_FORM_strp) 331 .uleb128 0x3a # (DW_AT_decl_file) 332 .uleb128 0xb # (DW_FORM_data1) 333 .uleb128 0x3b # (DW_AT_decl_line) 334 .uleb128 0xb # (DW_FORM_data1) 335 .uleb128 0x49 # (DW_AT_type) 336 .uleb128 0x13 # (DW_FORM_ref4) 337 .uleb128 0x11 # (DW_AT_low_pc) 338 .uleb128 0x1 # (DW_FORM_addr) 339 .uleb128 0x12 # (DW_AT_high_pc) 340 .uleb128 0x7 # (DW_FORM_data8) 341 .uleb128 0x40 # (DW_AT_frame_base) 342 .uleb128 0x18 # (DW_FORM_exprloc) 343 .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) 344 .uleb128 0x19 # (DW_FORM_flag_present) 345 .byte 0 346 .byte 0 347 .uleb128 0xa # (abbrev code) 348 .uleb128 0xb # (TAG: DW_TAG_lexical_block) 349 .byte 0x1 # DW_children_yes 350 .uleb128 0x11 # (DW_AT_low_pc) 351 .uleb128 0x1 # (DW_FORM_addr) 352 .uleb128 0x12 # (DW_AT_high_pc) 353 .uleb128 0x7 # (DW_FORM_data8) 354 .byte 0 355 .byte 0 356 .uleb128 0xb # (abbrev code) 357 .uleb128 0x34 # (TAG: DW_TAG_variable) 358 .byte 0 # DW_children_no 359 .uleb128 0x3 # (DW_AT_name) 360 .uleb128 0x8 # (DW_FORM_string) 361 .uleb128 0x3a # (DW_AT_decl_file) 362 .uleb128 0xb # (DW_FORM_data1) 363 .uleb128 0x3b # (DW_AT_decl_line) 364 .uleb128 0xb # (DW_FORM_data1) 365 .uleb128 0x49 # (DW_AT_type) 366 .uleb128 0x13 # (DW_FORM_ref4) 367 .uleb128 0x2 # (DW_AT_location) 368 .uleb128 0x18 # (DW_FORM_exprloc) 369 .byte 0 370 .byte 0 371 .uleb128 0xc # (abbrev code) 372 .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site) 373 .byte 0x1 # DW_children_yes 374 .uleb128 0x11 # (DW_AT_low_pc) 375 .uleb128 0x1 # (DW_FORM_addr) 376 .uleb128 0x31 # (DW_AT_abstract_origin) 377 .uleb128 0x13 # (DW_FORM_ref4) 378 .byte 0 379 .byte 0 380 .uleb128 0xd # (abbrev code) 381 .uleb128 0x410a # (TAG: DW_TAG_GNU_call_site_parameter) 382 .byte 0 # DW_children_no 383 .uleb128 0x2 # (DW_AT_location) 384 .uleb128 0x18 # (DW_FORM_exprloc) 385 .uleb128 0x2111 # (DW_AT_GNU_call_site_value) 386 .uleb128 0x18 # (DW_FORM_exprloc) 387 .uleb128 0x2112 # (DW_AT_GNU_call_site_data_value) 388 .uleb128 0x18 # (DW_FORM_exprloc) 389 .byte 0 390 .byte 0 391 .uleb128 0xe # (abbrev code) 392 .uleb128 0x34 # (TAG: DW_TAG_variable) 393 .byte 0 # DW_children_no 394 .uleb128 0x3 # (DW_AT_name) 395 .uleb128 0x8 # (DW_FORM_string) 396 .uleb128 0x3a # (DW_AT_decl_file) 397 .uleb128 0xb # (DW_FORM_data1) 398 .uleb128 0x3b # (DW_AT_decl_line) 399 .uleb128 0xb # (DW_FORM_data1) 400 .uleb128 0x49 # (DW_AT_type) 401 .uleb128 0x13 # (DW_FORM_ref4) 402 .uleb128 0x3f # (DW_AT_external) 403 .uleb128 0x19 # (DW_FORM_flag_present) 404 .uleb128 0x2 # (DW_AT_location) 405 .uleb128 0x18 # (DW_FORM_exprloc) 406 .byte 0 407 .byte 0 408 .uleb128 0xf # (abbrev code) 409 .uleb128 0x35 # (TAG: DW_TAG_volatile_type) 410 .byte 0 # DW_children_no 411 .uleb128 0x49 # (DW_AT_type) 412 .uleb128 0x13 # (DW_FORM_ref4) 413 .byte 0 414 .byte 0 415 .uleb128 0x10 # (abbrev code) 416 .uleb128 0xf # (TAG: DW_TAG_pointer_type) 417 .byte 0 # DW_children_no 418 .uleb128 0xb # (DW_AT_byte_size) 419 .uleb128 0xb # (DW_FORM_data1) 420 .uleb128 0x49 # (DW_AT_type) 421 .uleb128 0x13 # (DW_FORM_ref4) 422 .byte 0 423 .byte 0 424 .byte 0 425 .section .debug_aranges,"",@progbits 426 .long 0x3c # Length of Address Ranges Info 427 .value 0x2 # DWARF Version 428 .long .Ldebug_info0 # Offset of Compilation Unit Info 429 .byte 0x8 # Size of Address 430 .byte 0 # Size of Segment Descriptor 431 .value 0 # Pad to 16 byte boundary 432 .value 0 433 .quad .Ltext0 # Address 434 .quad .Letext0-.Ltext0 # Length 435 .quad .LFB1 # Address 436 .quad .LFE1-.LFB1 # Length 437 .quad 0 438 .quad 0 439 .section .debug_ranges,"",@progbits 440.Ldebug_ranges0: 441 .quad .Ltext0 # Offset 0 442 .quad .Letext0 443 .quad .LFB1 # Offset 0x10 444 .quad .LFE1 445 .quad 0 446 .quad 0 447 .section .debug_line,"",@progbits 448.Ldebug_line0: 449 .section .debug_str,"MS",@progbits,1 450.LASF1: 451 .string "gdb.arch/amd64-entry-value-paramref.cc" 452.LASF2: 453 .string "" 454.LASF0: 455 .string "GNU C++ 4.8.2 20131212 (Red Hat 4.8.2-7) -mtune=generic -march=x86-64 -g -O2" 456.LASF3: 457 .string "main" 458 .ident "GCC: (GNU) 4.8.2 20131212 (Red Hat 4.8.2-7)" 459 .section .note.GNU-stack,"",@progbits 460