diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-10-11 18:40:29 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-10-11 18:40:29 +0000 |
commit | b981d7096356e3e92b66f0813881754fc69bf41d (patch) | |
tree | 0edc96fe699cafa5857e63e111d743a37316394c /sim/common/callback.c | |
parent | f5bc1778c3150f6e9364a1af81f3ba2658f9e68c (diff) | |
download | gdb-b981d7096356e3e92b66f0813881754fc69bf41d.zip gdb-b981d7096356e3e92b66f0813881754fc69bf41d.tar.gz gdb-b981d7096356e3e92b66f0813881754fc69bf41d.tar.bz2 |
2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>
* callback.c (cb_is_stdin): Add.
* syscall.c (cb_syscall): Test for stdin, not just fd 0.
2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>
* callback.h (cb_is_stdin): Add prototype.
Diffstat (limited to 'sim/common/callback.c')
-rw-r--r-- | sim/common/callback.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sim/common/callback.c b/sim/common/callback.c index fec1d14..f83dd54 100644 --- a/sim/common/callback.c +++ b/sim/common/callback.c @@ -1136,3 +1136,10 @@ sim_cb_eprintf (host_callback *p, const char *fmt, ...) p->evprintf_filtered (p, fmt, ap); va_end (ap); } + +int +cb_is_stdin (host_callback *cb, int fd) +{ + return fdbad (cb, fd) ? 0 : fdmap (cb, fd) == 0; +} + |