"Dmitry V. Levin" <ldv-u2l5PoMzF/vg9huczpv...@public.gmane.org> writes:
> On Wed, Nov 04, 2009 at 12:55:46PM +0100, Andreas Schwab wrote: >> This patch refactors the printing of 64bit syscall arguments. > > I like the change, but I have two questions about particular hunks of > the patch. > >> @@ -631,7 +625,6 @@ sys_lseek64(struct tcb *tcp) >> { >> if (entering(tcp)) { >> long long offset; >> - ALIGN64 (tcp, 1); /* FreeBSD aligns off_t args */ >> offset = LONG_LONG(tcp->u_arg [1], tcp->u_arg[2]); >> if (tcp->u_arg[3] == SEEK_SET) >> tprintf("%ld, %llu, ", tcp->u_arg[0], offset); > > Why printllval() is not used here? Accidentally dropped the ball here. >> @@ -2836,22 +2822,14 @@ int >> sys_fadvise64_64(struct tcb *tcp) >> { >> if (entering(tcp)) { >> - tprintf("%ld, %lld, %lld, ", >> - tcp->u_arg[0], >> -#if defined LINUX_MIPSN32 >> - tcp->ext_arg[1], tcp->ext_arg[2]); >> - printxval(advise, tcp->u_arg[3], "POSIX_FADV_???"); >> -#elif defined IA64 || defined X86_64 || defined ALPHA || defined >> LINUX_MIPSN64 >> - (long long int) tcp->u_arg[1], (long long int) >> tcp->u_arg[2]); >> - printxval(advise, tcp->u_arg[3], "POSIX_FADV_???"); >> -#elif defined ARM || defined POWERPC >> - LONG_LONG(tcp->u_arg[2], tcp->u_arg[3]), >> - LONG_LONG(tcp->u_arg[4], tcp->u_arg[5])); >> + int argn; >> + tprintf("%ld, ", tcp->u_arg[0]); >> + argn = printllval(tcp, "%lld, ", 1); >> + argn = printllval(tcp, "%lld, ", argn); >> +#if defined ARM || defined POWERPC >> printxval(advise, tcp->u_arg[1], "POSIX_FADV_???"); >> #else >> - LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]), >> - LONG_LONG(tcp->u_arg[3], tcp->u_arg[4])); >> - printxval(advise, tcp->u_arg[5], "POSIX_FADV_???"); >> + printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???"); >> #endif >> } >> return 0; > > I'm afraid that this change breaks ARM because printxval() does no > special handling for ARM. I guess you mean printllval? Yes, that breaks ARM. Andreas. -- Andreas Schwab, sch...@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." ------------------------------------------------------------------------------ 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 Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel