Hi, On Fri, Aug 14, 2009 at 12:34:05PM +0200, Paolo Bonzini wrote: > This patch changes the paccept syscall to accept4 for x86-64, since > the former was dropped in Linux kernel commit 2d4c8266. > > At the same time, it adds support for pretty-printing its arguments.
The pretty printing part of the change is incomplete, it misses
the case when 3rd arg is NULL. Please consider a fix appended below.
All the rest looks OK for me.
--- a/net.c
+++ b/net.c
@@ -1308,7 +1308,9 @@ do_accept(struct tcb *tcp, int flags_arg)
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
- } else if (!tcp->u_arg[2])
+ return 0;
+ }
+ if (!tcp->u_arg[2])
tprintf("%#lx, NULL", tcp->u_arg[1]);
else {
int len;
@@ -1320,11 +1322,11 @@ do_accept(struct tcb *tcp, int flags_arg)
}
tprintf(", ");
printnum_int(tcp, tcp->u_arg[2], "%u");
- if (flags_arg >= 0) {
- tprintf(", ");
- printflags(sock_type_flags, tcp->u_arg[flags_arg],
- "SOCK_???");
- }
+ }
+ if (flags_arg >= 0) {
+ tprintf(", ");
+ printflags(sock_type_flags, tcp->u_arg[flags_arg],
+ "SOCK_???");
}
return 0;
}
--
ldv
pgpTV5unpnFzo.pgp
Description: PGP signature
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
