]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.base/break1.c
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / break1.c
1 /* This testcase is part of GDB, the GNU debugger.
2
3 Copyright 1992-2024 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 /* The code for this file was extracted from the gdb testsuite
19 testcase "break.c". */
20
21 /* A structure we use for field name completion tests. */
22 struct some_struct
23 {
24 int a_field;
25 int b_field;
26 union { int z_field; };
27 };
28
29 struct some_struct values[50];
30
31 /* Some definitions for tag completion. */
32 enum some_enum { VALUE };
33
34 enum some_enum some_enum_global;
35
36 union some_union
37 {
38 int f1;
39 double f2;
40 };
41
42 union some_union some_union_global;
43
44 /* A variable with a name "similar" to the above struct, to test that
45 tag completion works ok. */
46 int some_variable;
47
48 /* The following functions do nothing useful. They are included
49 simply as places to try setting breakpoints at. They are
50 explicitly "one-line functions" to verify that this case works
51 (some versions of gcc have or have had problems with this).
52
53 These functions are in a separate source file to prevent an
54 optimizing compiler from inlining them and optimizing them away. */
55
56 int marker1 (void) { return (0); } /* set breakpoint 15 here */
57 int marker2 (int a) { return (1); } /* set breakpoint 8 here */
58 void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
59 void marker4 (long d) { values[0].a_field = d; } /* set breakpoint 14 here */