* gdb.base/pie-support.exp: Pass "quiet" flag to gdb_compile.
[binutils-gdb.git] / gdb / testsuite / gdb.base / watchpoints.c
1 #include <stdio.h>
2 #include <unistd.h>
3 /*
4 * This source is mainly to test
5 * what happens when a watchpoint is removed
6 * while another watchpoint, inserted later is
7 * left active.
8 */
9
10 int count = -1;
11 int ival1 = -1;
12 int ival2 = -1;
13 int ival3 = -1;
14 int ival4 = -1;
15
16 int
17 main ()
18 {
19 #ifdef usestubs
20 set_debug_traps();
21 breakpoint();
22 #endif
23
24 for (count = 0; count < 4; count++) {
25 ival1 = count; ival2 = count;
26 ival3 = count; ival4 = count;
27 }
28
29 ival1 = count; ival2 = count; /* Outside loop */
30 ival3 = count; ival4 = count;
31
32 return 0;
33 }