aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin/interp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-03-17 19:03:30 +0000
committerMike Frysinger <vapier@gentoo.org>2011-03-17 19:03:30 +0000
commit9e6584c9a0e5a21e2aac8537c1443fbcf08ea91b (patch)
tree6626fe254933603f748e5e3a4db256ebd417f98e /sim/bfin/interp.c
parentd4862372c6a47c5d2e5abfed59a0c757bc494343 (diff)
downloadgdb-9e6584c9a0e5a21e2aac8537c1443fbcf08ea91b.zip
gdb-9e6584c9a0e5a21e2aac8537c1443fbcf08ea91b.tar.gz
gdb-9e6584c9a0e5a21e2aac8537c1443fbcf08ea91b.tar.bz2
sim: bfin: check for kill/pread
If the host system (like Windows) doesn't support these functions, then make sure we don't use them. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/bfin/interp.c')
-rw-r--r--sim/bfin/interp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c
index 1f8681d..f8669d3 100644
--- a/sim/bfin/interp.c
+++ b/sim/bfin/interp.c
@@ -297,6 +297,7 @@ bfin_syscall (SIM_CPU *cpu)
sc.errcode = TARGET_ENOSYS;
else
{
+#ifdef HAVE_PREAD
char *data = xmalloc (sc.arg2);
/* XXX: Should add a cb->pread. */
@@ -306,6 +307,9 @@ bfin_syscall (SIM_CPU *cpu)
sc.errcode = TARGET_EINVAL;
free (data);
+#else
+ sc.errcode = TARGET_ENOSYS;
+#endif
}
if (sc.errcode)
@@ -495,8 +499,13 @@ bfin_syscall (SIM_CPU *cpu)
}
else
{
+#ifdef HAVE_KILL
sc.result = kill (sc.arg1, sc.arg2);
goto sys_finish;
+#else
+ sc.result = -1;
+ sc.errcode = TARGET_ENOSYS;
+#endif
}
break;