e3e27ca7839d1247ef9d9f4d1b8905f4eb9a46bb
1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 1993-2021 Free Software Foundation, Inc.
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.
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.
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/>. */
18 #if defined __x86_64__
19 # define ASM_REG "rax"
20 #elif defined __i386__
21 # define ASM_REG "eax"
26 /* A class small enough that it fits in a register. */
42 /* Given the use of the GNU register-asm local variables extension,
43 the compiler puts this variable in a register. This means that
44 GDB can't call any methods for this variable, which is what we
46 register small v
asm (ASM_REG
);
50 /* Perform a computation sufficiently complicated that optimizing
51 compilers won't optimize out the variable. If some compiler
52 constant-folds this whole loop, maybe using a parameter to this
53 function here would help. */
55 for (i
= 0; i
< 13; ++i
)
57 --v
.x
; /* v.x is now 77 */
58 return v
.x
+ 5; /* set breakpoint here */
This page took 0.03145 seconds and 3 git commands to generate.