readv/writev io dumping support
John Hughes
john at Calva.COM
Thu Jul 5 08:49:02 UTC 2001
A few minor nits:
>diff -ruN strace-4.3.orig/syscall.c strace-4.3/syscal
>+#ifdef SYS_readv
>+ case SYS_readv:
>+#endif
>+ if (qual_flags[tcp->u_arg[0]] & QUAL_READ)
>+ dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
>+ break;
The #endif should be after the break, otherwise you get an extra
break in the switch for systems without SYS_readv/SYS_writev.
> #include <fcntl.h>
>+#include <sys/uio.h>
> #ifdef SUNOS4
> #include <machine/reg.h>
Should be conditional on HAVE_SYS_UIO_H, no point testing for
it if we don't use the test.
>+void
>+dumpiov(tcp, len, addr)
>+struct tcb * tcp;
>+int len;
>+char * addr;
>+{
>+ struct iovec *iov;
The dumpiov stuff should be conditional on HAVE_SYS_UIO_H, or possibly
HAVE_STRUCT_IOVEC (which we don't have at the moment).
The "addr" argument should be a long (cf dumpstr).
More information about the Strace-devel
mailing list