]> granicus.if.org Git - strace/commitdiff
mips o32: implement fetching the 7th subcall argument
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 28 Sep 2016 01:57:59 +0000 (01:57 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 28 Sep 2016 03:00:10 +0000 (03:00 +0000)
* syscall.c [LINUX_MIPSO32] (decode_mips_subcall): Fetch the last
argument of 7-arg syscalls.

syscall.c

index 9627d68dd291fbeccc69dc909fc6d63110f3464f..f649a9076321e6b3aa5ad3f2029074fbc2f89ead 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -643,11 +643,18 @@ decode_mips_subcall(struct tcb *tcp)
                sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0]));
        /*
         * Fetching the last arg of 7-arg syscalls (fadvise64_64
-        * and sync_file_range) would require additional code,
+        * and sync_file_range) requires additional code,
         * see linux/mips/get_syscall_args.c
         */
+       if (tcp->s_ent->nargs == MAX_ARGS) {
+               if (umoven(tcp,
+                          mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]),
+                          sizeof(tcp->u_arg[0]),
+                          &tcp->u_arg[MAX_ARGS - 1]) < 0)
+               tcp->u_arg[MAX_ARGS - 1] = 0;
+       }
 }
-#endif
+#endif /* LINUX_MIPSO32 */
 
 static void
 dumpio(struct tcb *tcp)