[gdb/testsuite] Capture many-headers.exp progress and output in gdb.log
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / signals.c
CommitLineData
c906108c
SS
1/* Test GDB dealing with stuff like stepping into sigtramp. */
2
3#include <signal.h>
085dd6e6 4#include <unistd.h>
c906108c 5
c906108c
SS
6
7static int count = 0;
8
085dd6e6
JM
9static void
10handler (int sig)
c906108c
SS
11{
12 signal (sig, handler);
13 ++count;
14}
15
16static void
17func1 ()
18{
19 ++count;
20}
21
22static void
23func2 ()
24{
25 ++count;
26}
27
28int
29main ()
30{
c906108c
SS
31#ifdef SIGALRM
32 signal (SIGALRM, handler);
33#endif
34#ifdef SIGUSR1
35 signal (SIGUSR1, handler);
36#endif
37 alarm (1);
38 ++count; /* first */
39 alarm (1);
40 ++count; /* second */
41 func1 ();
42 alarm (1);
43 func2 ();
44 return count;
45}
This page took 2.102519 seconds and 4 git commands to generate.