Fix zero_ext documentation
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / attach.c
CommitLineData
74cf1395
JM
1/* This program is intended to be started outside of gdb, and then
2 attached to by gdb. Thus, it simply spins in a loop. The loop
3 is exited when & if the variable 'should_exit' is non-zero. (It
4 is initialized to zero in this program, so the loop will never
5 exit unless/until gdb sets the variable to non-zero.)
6 */
7#include <stdio.h>
1cf2f1b0 8#include <unistd.h>
74cf1395
JM
9
10int should_exit = 0;
11
12int main ()
13{
14 int local_i = 0;
15
1cf2f1b0
JK
16 alarm (60);
17
74cf1395
JM
18 while (! should_exit)
19 {
20 local_i++;
21 }
1cf2f1b0 22 return 0; /* postloop */
74cf1395 23}
This page took 1.80847 seconds and 4 git commands to generate.