aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/mips_pro.c
blob: b659d82ded27c9755a888b0326faca64410995cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Tests regarding examination of prologues.  */

#ifdef PROTOTYPES
int
inner (int z)
#else
int
inner (z)
     int z;
#endif
{
  return 2 * z;
}

#ifdef PROTOTYPES
int
middle (int x)
#else
int
middle (x)
     int x;
#endif
{
  if (x == 0)
    return inner (5);
  else
    return inner (6);
}

#ifdef PROTOTYPES
int
top (int y)
#else
int
top (y)
     int y;
#endif
{
  return middle (y + 1);
}

#ifdef PROTOTYPES
int
main (int argc, char **argv)
#else
int
main (argc, argv)
     int argc;
     char **argv;
#endif
{
#ifdef usestubs
  set_debug_traps();
  breakpoint();
#endif
  return top (-1) + top (1);
}