old-cross-binutils/gdb/testsuite/gdb.base/mips_pro.c

58 lines
606 B
C
Raw Normal View History

/* Tests regarding examination of prologues. */
1999-06-28 16:06:02 +00:00
#ifdef PROTOTYPES
int
inner (int z)
#else
int
inner (z)
int z;
1999-06-28 16:06:02 +00:00
#endif
{
return 2 * z;
}
1999-06-28 16:06:02 +00:00
#ifdef PROTOTYPES
int
middle (int x)
#else
int
middle (x)
int x;
1999-06-28 16:06:02 +00:00
#endif
{
if (x == 0)
return inner (5);
else
return inner (6);
}
1999-06-28 16:06:02 +00:00
#ifdef PROTOTYPES
int
top (int y)
#else
int
top (y)
int y;
1999-06-28 16:06:02 +00:00
#endif
{
return middle (y + 1);
}
1999-06-28 16:06:02 +00:00
#ifdef PROTOTYPES
int
main (int argc, char **argv)
#else
int
main (argc, argv)
1999-06-28 16:06:02 +00:00
int argc;
char **argv;
#endif
{
#ifdef usestubs
set_debug_traps();
breakpoint();
#endif
return top (-1) + top (1);
}