On Tue, Apr 17, 2012 at 11:05:04AM -0700, H.J. Lu wrote:
> Hi,
>
> This patch adds ia32 support to x32 strace. Tested on Linux/x32.
[...]
> @@ -868,15 +874,14 @@ get_scno(struct tcb *tcp)
> }
> # endif
> # ifdef X32
> - if (currpers == 0 || currpers == 1) {
> - fprintf(stderr, "syscall_%lu (...) in unsupported %s "
> - "mode of process PID=%d\n", scno,
> - currpers == 0 ? "64-bit" : "32-bit", tcp->pid);
> + if (currpers == 0) {
> + fprintf(stderr, "syscall_%lu (...) in unsupported 64-bit "
> + "mode of process PID=%d\n", scno, tcp->pid);
> return 0;
> }
> -# else
> - update_personality(tcp, currpers);
> + else if (currpers == 1)
> # endif
> + update_personality(tcp, currpers);
> #elif defined(IA64)
> # define IA64_PSR_IS ((long)1 << 34)
> if (upeek(tcp, PT_CR_IPSR, &psr) >= 0)This part of the change seems to be wrong: if strace supports two personalities on X32, it should be able to switch to any of them, not just to currpers == 1. Looks like additional currpers translation is needed for the X32 case. -- ldv
pgpuOXBWE6Qo5.pgp
Description: PGP signature
------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
