diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-04-18 20:53:03 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-04-18 21:22:31 -0400 |
commit | 7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf (patch) | |
tree | 6b5e493e21e20d52d35e251c11acf48b78919e31 /sim/testsuite | |
parent | d3b0ab8b36319f4232367b046ecfc0c656a177ad (diff) | |
download | gdb-7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf.zip gdb-7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf.tar.gz gdb-7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf.tar.bz2 |
sim: syscall: add getpid support
Hoist the Blackfin implementation up to the common one.
Diffstat (limited to 'sim/testsuite')
-rw-r--r-- | sim/testsuite/bfin/ChangeLog | 4 | ||||
-rw-r--r-- | sim/testsuite/bfin/getpid.c | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sim/testsuite/bfin/ChangeLog b/sim/testsuite/bfin/ChangeLog index 2abca7e..ea617e3 100644 --- a/sim/testsuite/bfin/ChangeLog +++ b/sim/testsuite/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-04-18 Mike Frysinger <vapier@gentoo.org> + + * getpid.c: New test. + 2021-04-08 Mike Frysinger <vapier@gentoo.org> * allinsn.exp (arch): Delete. diff --git a/sim/testsuite/bfin/getpid.c b/sim/testsuite/bfin/getpid.c new file mode 100644 index 0000000..11d5c50 --- /dev/null +++ b/sim/testsuite/bfin/getpid.c @@ -0,0 +1,18 @@ +/* Basic getpid tests. +# mach: bfin +# cc: -msim +*/ + +#include <stdio.h> +#include <unistd.h> + +int main(int argc, char *argv[]) +{ + pid_t pid = getpid(); + if (pid < 0) { + perror("getpid failed"); + return 1; + } + puts("pass"); + return 0; +} |