This commit was generated by cvs2svn to track changes on a CVS vendor
[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>
4
5#ifdef __sh__
6#define signal(a,b) /* Signals not supported on this target - make them go away */
7#define alarm(a) /* Ditto for alarm() */
8#endif
9
10static int count = 0;
11
12static void
13handler (sig)
14 int sig;
15{
16 signal (sig, handler);
17 ++count;
18}
19
20static void
21func1 ()
22{
23 ++count;
24}
25
26static void
27func2 ()
28{
29 ++count;
30}
31
32int
33main ()
34{
35#ifdef usestubs
36 set_debug_traps();
37 breakpoint();
38#endif
39#ifdef SIGALRM
40 signal (SIGALRM, handler);
41#endif
42#ifdef SIGUSR1
43 signal (SIGUSR1, handler);
44#endif
45 alarm (1);
46 ++count; /* first */
47 alarm (1);
48 ++count; /* second */
49 func1 ();
50 alarm (1);
51 func2 ();
52 return count;
53}
This page took 0.024996 seconds and 4 git commands to generate.