From: Dmitry V. Levin Date: Mon, 22 Aug 2016 09:34:54 +0000 (+0000) Subject: sparc64: fix decoding of struct stat64 related syscalls X-Git-Tag: v4.14~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f5fd0d6e2ecb102dc1ec704222e5f7e9503c86b;p=strace sparc64: fix decoding of struct stat64 related syscalls For some reason, struct stat and struct stat64 are different on sparc64. This change fixes decoding of struct stat64 related syscalls for sparc64 personality, sparc32 personality on sparc64 needs more work. * file.c (printstat64) [SPARC64]: Do not use printstat. (SYS_FUNC(newfstatat)): Likewise. --- diff --git a/file.c b/file.c index 2ff0ac7d..51e8e41d 100644 --- a/file.c +++ b/file.c @@ -206,12 +206,12 @@ printstat64(struct tcb *tcp, long addr) (void) sizeof(char[sizeof statbuf == STAT64_SIZE ? 1 : -1]); # endif -# ifdef STAT32_PERSONALITY +# if defined STAT32_PERSONALITY && !defined SPARC64 if (current_personality != STAT32_PERSONALITY) { printstat(tcp, addr); return; } -# endif /* STAT32_PERSONALITY */ +# endif /* STAT32_PERSONALITY && !SPARC64 */ if (!umove_or_printaddr(tcp, addr, &statbuf)) do_printstat64(tcp, &statbuf); @@ -260,7 +260,7 @@ SYS_FUNC(newfstatat) printpath(tcp, tcp->u_arg[1]); tprints(", "); } else { -#if defined STAT32_PERSONALITY +#if defined STAT32_PERSONALITY && !defined SPARC64 if (current_personality == STAT32_PERSONALITY) printstat64(tcp, tcp->u_arg[2]); else