Bug#369651: strace: show poll() parameters before blocking
Dmitry V. Levin
ldv at altlinux.org
Sat Sep 22 23:32:45 UTC 2007
Hi,
Sorry for the long delay,
On Thu, Aug 30, 2007 at 07:42:51PM -0400, Alan Curry wrote:
[...]
> 2007-08-30 Alan Curry <pacman at world.std.com>
>
> * stream.c (sprintflags): New function.
> (decode_poll): Rearrange so that arguments are decoded and printed on
> syscall entry, except for revents which are now printed in the auxstr.
The output timespec should be printed in the auxstr as well.
> + if (syserror(tcp))
> + return 0;
[...]
> + if (!fds.revents)
> + continue;
[...]
> + if (fds.fd < 0) {
> + sprintf(str, "{fd=%d}", fds.fd);
> + cumlen += strlen(str);
> + if (cumlen < sizeof(outstr))
> + strcat(outstr, str);
> + continue;
> + }
This fds.fd check is redundant:
if syscall succeeded and "revents" is set, then "fd" should be printed
unconditionally.
I'll submit an updated change in 3 parts.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20070923/ecb47749/attachment.bin>
More information about the Strace-devel
mailing list