diff options
author | Stan Shebs <shebs@codesourcery.com> | 1994-06-07 01:57:15 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1994-06-07 01:57:15 +0000 |
commit | ef44eed173353ff002da6fe92680e40068cd081f (patch) | |
tree | beeeaecb50227b8c1fe964debaf3c8f45bc9ac9a /gdb/testsuite/gdb.base/recurse.c | |
parent | 33268150cbbcc90ec13f5603d566537cf4cd569e (diff) | |
download | binutils-gdb-ef44eed173353ff002da6fe92680e40068cd081f.tar.gz |
Reorganized GDB tests - base
Diffstat (limited to 'gdb/testsuite/gdb.base/recurse.c')
-rw-r--r-- | gdb/testsuite/gdb.base/recurse.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/recurse.c b/gdb/testsuite/gdb.base/recurse.c new file mode 100644 index 00000000000..6ae93a5dd95 --- /dev/null +++ b/gdb/testsuite/gdb.base/recurse.c @@ -0,0 +1,21 @@ +/* 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() +{ + recurse (10); +} |