OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.base/] [signals.c] - Blame information for rev 842

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/* Test GDB dealing with stuff like stepping into sigtramp.  */
2
 
3
#include <signal.h>
4
#include <unistd.h>
5
 
6
#ifdef __sh__
7
#define signal(a,b)     /* Signals not supported on this target - make them go away */
8
#define alarm(a)        /* Ditto for alarm() */
9
#endif
10
 
11
static int count = 0;
12
 
13
#ifdef PROTOTYPES
14
static void
15
handler (int sig)
16
#else
17
static void
18
handler (sig)
19
     int sig;
20
#endif
21
{
22
  signal (sig, handler);
23
  ++count;
24
}
25
 
26
static void
27
func1 ()
28
{
29
  ++count;
30
}
31
 
32
static void
33
func2 ()
34
{
35
  ++count;
36
}
37
 
38
int
39
main ()
40
{
41
#ifdef usestubs
42
  set_debug_traps();
43
  breakpoint();
44
#endif
45
#ifdef SIGALRM
46
  signal (SIGALRM, handler);
47
#endif
48
#ifdef SIGUSR1
49
  signal (SIGUSR1, handler);
50
#endif
51
  alarm (1);
52
  ++count; /* first */
53
  alarm (1);
54
  ++count; /* second */
55
  func1 ();
56
  alarm (1);
57
  func2 ();
58
  return count;
59
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.