1 /* Copyright (C) 2010-2019 Free Software Foundation, Inc.
3 This file is part of GDB.
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 /* The original program corresponding to implptr.S.
19 This came from Jakub's gcc-patches email implementing
20 DW_OP_GNU_implicit_pointer.
21 Note that it is not ever compiled, implptr.S is used instead.
22 However, it is used to extract breakpoint line numbers. */
32 add (struct S
*a
, struct S
*b
, int c
)
34 *a
->x
+= *b
->x
; /* baz breakpoint */
47 struct S p
[2] = { {&i
, i
* 2}, {&j
, j
* 2} };
48 add (&p
[0], &p
[1], 0);
51 add (&p
[0], &p
[1], 3);
52 return i
+ j
; /* foo breakpoint */
57 typedef intpp
*intppp
;
59 int __attribute__ ((noinline
, used
, noclone
))
65 i
++; /* bar breakpoint */
71 return bar(5) + foo (23);