mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
Initial creation of sourceware repository
This commit is contained in:
25
gdb/testsuite/gdb.base/recurse.c
Normal file
25
gdb/testsuite/gdb.base/recurse.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/* Trivial code used to test watchpoints in recursive code and
|
||||
auto-deletion of watchpoints as they go out of scope. */
|
||||
|
||||
static int
|
||||
recurse (a)
|
||||
int a;
|
||||
{
|
||||
int b = 0;
|
||||
|
||||
if (a == 1)
|
||||
return 1;
|
||||
|
||||
b = a;
|
||||
b *= recurse (a - 1);
|
||||
return b;
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
#ifdef usestubs
|
||||
set_debug_traps();
|
||||
breakpoint();
|
||||
#endif
|
||||
recurse (10);
|
||||
}
|
||||
Reference in New Issue
Block a user