OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [gdb/] [testsuite/] [gdb.base/] [recurse.c] - Diff between revs 24 and 33

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
/* Trivial code used to test watchpoints in recursive code and
/* Trivial code used to test watchpoints in recursive code and
   auto-deletion of watchpoints as they go out of scope.  */
   auto-deletion of watchpoints as they go out of scope.  */
 
 
#ifdef PROTOTYPES
#ifdef PROTOTYPES
static int
static int
recurse (int a)
recurse (int a)
#else
#else
static int
static int
recurse (a)
recurse (a)
     int a;
     int a;
#endif
#endif
{
{
  int b = 0;
  int b = 0;
 
 
  if (a == 1)
  if (a == 1)
    return 1;
    return 1;
 
 
  b = a;
  b = a;
  b *= recurse (a - 1);
  b *= recurse (a - 1);
  return b;
  return b;
}
}
 
 
int main()
int main()
{
{
#ifdef usestubs
#ifdef usestubs
  set_debug_traps();
  set_debug_traps();
  breakpoint();
  breakpoint();
#endif
#endif
  recurse (10);
  recurse (10);
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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