Commit | Line | Data |
---|---|---|
a1dea79a FF |
1 | /* This testcase is part of GDB, the GNU debugger. |
2 | ||
618f726f | 3 | Copyright 1992-2016 Free Software Foundation, Inc. |
a1dea79a FF |
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 | |
a9762ec7 | 7 | the Free Software Foundation; either version 3 of the License, or |
a1dea79a FF |
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. | |
a9762ec7 | 14 | |
a1dea79a | 15 | You should have received a copy of the GNU General Public License |
c7b778ff | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
a1dea79a FF |
17 | |
18 | /* The code for this file was extracted from the gdb testsuite | |
19 | testcase "break.c". */ | |
20 | ||
87728fa0 DJ |
21 | /* A structure we use for field name completion tests. */ |
22 | struct some_struct | |
23 | { | |
24 | int a_field; | |
25 | int b_field; | |
9ae8282d | 26 | union { int z_field; }; |
87728fa0 DJ |
27 | }; |
28 | ||
29 | struct some_struct values[50]; | |
30 | ||
2f68a895 TT |
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 | ||
a1dea79a FF |
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 | ||
a1dea79a FF |
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 */ | |
87728fa0 | 59 | void marker4 (long d) { values[0].a_field = d; } /* set breakpoint 14 here */ |