428b16bd5a
"target vxworks" and friends have been removed 10 years ago already:
commit e84ecc995d
Author: Andrew Cagney <cagney@redhat.com>
AuthorDate: Sat Nov 13 23:10:02 2004 +0000
2004-11-13 Andrew Cagney <cagney@gnu.org>
* configure.tgt: Delete i[34567]86-*-vxworks*, m68*-netx-*,
m68*-*-vxworks*, mips*-*-vxworks*, powerpc-*-vxworks*, and
sparc-*-vxworks*.
* NEWS: Mention that vxworks was deleted.
(...)
* remote-vxmips.c, remote-vx.c: Delete.
* remote-vx68.c: Delete.
(...)
This removes related leftover cruft from the testsuite.
Tested on x86_64 Fedora 20, native and gdbserver.
gdb/testsuite/
2014-09-16 Pedro Alves <palves@redhat.com>
* config/vx.exp, config/vxworks.exp, config/vxworks29k.exp: Delete
files.
* gdb.base/a2-run.exp: Remove all code guarded by istarget
"*-*-vxworks*" throughout.
* gdb.base/break.exp: Likewise.
* gdb.base/default.exp: Likewise.
* gdb.base/scope.exp: Likewise.
* gdb.base/sepdebug.exp: Likewise.
* gdb.base/break.c: Remove all code guarded by #ifdef vxworks
throughout.
* gdb.base/run.c: Likewise.
* gdb.base/sepdebug.c: Likewise.
* gdb.hp/gdb.aCC/run.c: Likewise.
* gdb.reverse/until-reverse.c: Likewise.
* lib/gdb.exp (gdb_compile): Remove is_vxworks branch.
47 lines
840 B
C
47 lines
840 B
C
/*
|
|
* This simple classical example of recursion is useful for
|
|
* testing stack backtraces and such.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifdef PROTOTYPES
|
|
int factorial (int);
|
|
|
|
int
|
|
main (int argc, char **argv, char **envp)
|
|
#else
|
|
int
|
|
main (argc, argv, envp)
|
|
int argc;
|
|
char *argv[], **envp;
|
|
#endif
|
|
{
|
|
#ifdef FAKEARGV
|
|
printf ("%d\n", factorial (1)); /* commands.exp: hw local_var out of scope */
|
|
#else
|
|
if (argc != 2) {
|
|
printf ("usage: factorial <number>\n");
|
|
return 1;
|
|
} else {
|
|
printf ("%d\n", factorial (atoi (argv[1])));
|
|
}
|
|
#endif
|
|
return 0;
|
|
}
|
|
|
|
#ifdef PROTOTYPES
|
|
int factorial (int value)
|
|
#else
|
|
int factorial (value) int value;
|
|
#endif
|
|
{
|
|
int local_var;
|
|
|
|
if (value > 1) {
|
|
value *= factorial (value - 1);
|
|
}
|
|
local_var = value;
|
|
return (value);
|
|
} /* commands.exp: local_var out of scope */
|