]> granicus.if.org Git - strace/commitdiff
sparc64: fix decoding of the forth argument of semctl syscall
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 17 Aug 2016 21:58:37 +0000 (21:58 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 19 Aug 2016 22:11:46 +0000 (22:11 +0000)
On sparc64, unlike all other architectures where semctl is an indirect
ipc subcall, the forth argument is passed directly.

* ipc_sem.c (SYS_FUNC(semctl)) [SPARC64]: Print 4th argument without
indirection in case of native personality.

ipc_sem.c

index bf82f330c882aabed6aadb510a8b9d0c5be8d936..e6172eefe6a53be3a6fb6b4b13ad5901ec2a4a4f 100644 (file)
--- a/ipc_sem.c
+++ b/ipc_sem.c
@@ -117,7 +117,11 @@ SYS_FUNC(semctl)
        tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
        PRINTCTL(semctl_flags, tcp->u_arg[2], "SEM_???");
        tprints(", ");
-       if (indirect_ipccall(tcp)) {
+       if (indirect_ipccall(tcp)
+#ifdef SPARC64
+           && current_personality != 0
+#endif
+          ) {
                printnum_ptr(tcp, tcp->u_arg[3]);
        } else {
                tprintf("%#lx", tcp->u_arg[3]);