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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
#include <stdio.h>
2
#include <signal.h>
3
 
4
#ifdef __sh__
5
#define signal(a,b)     /* Signals not supported on this target - make them go away */
6
#endif
7
 
8
 
9
#ifdef PROTOTYPES
10
void
11
handle_USR1 (int sig)
12
{
13
}
14
#else
15
void
16
handle_USR1 (sig)
17
     int sig;
18
{
19
}
20
#endif
21
 
22
int value;
23
 
24
#ifdef PROTOTYPES
25
int
26
main (void)
27
#else
28
int
29
main ()
30
#endif
31
{
32
  int my_array[3] = { 1, 2, 3 };
33
 
34
  value = 7;
35
 
36
#ifdef SIGUSR1
37
  signal (SIGUSR1, handle_USR1);
38
#endif
39
 
40
  printf ("value is %d\n", value);
41
  printf ("my_array[2] is %d\n", my_array[2]);
42
 
43
  {
44
    int i;
45
    for (i = 0; i < 5; i++)
46
      value++;
47
  }
48
 
49
  return 0;
50
}
51
 

powered by: WebSVN 2.1.0

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