On Sat, Feb 13, 2010 at 12:28:26AM +0300, Dmitry V. Levin wrote: > On Fri, Feb 12, 2010 at 09:39:12PM +0100, Andreas Schwab wrote: > [...] > > +int > > +sys_recvmmsg(struct tcb *tcp) > > +{ > > + if (entering(tcp)) { > > + tprintf("%ld, ", tcp->u_arg[0]); > > + printmmsghdr(tcp, tcp->u_arg[1]); > > + tprintf(", %ld, ", tcp->u_arg[2]); > > + /* flags */ > > + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); > > + /* timeout */ > > + tprintf(", "); > > + print_timespec(tcp, tcp->u_arg[4]); > > + } > > + return 0; > > +} > > If recvmmsg semantics is similar to recvmsg, then only file descriptor > can be decoded on entrance to the syscall, while the mmsghdr structure > (and all the rest) -- on exit from the syscall.
It appeared to be even more complicated because tcp->u_arg[4] should be decoded twice like in sys_ppoll, but tcp->u_arg[1] can be decoded only on exit. One possible solution is to abuse tcp->auxstr by storing the timespec decoded on entrance, then print this stored value on exit and replace it with the timespec decoded on exit. Another solution is to print as much as possible on entrance, and to place in tcp->auxstr the result of mmsghdr and timespec decoded on exit. Which one do you prefer? -- ldv
pgpY4hpdqykQZ.pgp
Description: PGP signature
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel