From: Andreas Schwab Date: Sat, 5 Jun 2010 19:50:30 +0000 (+0200) Subject: M68K: Fix fetching syscall arguments X-Git-Tag: v4.6~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=246888d23999d2ce5301bd9f814ed5c09a6889b8;p=strace M68K: Fix fetching syscall arguments * syscall.c (syscall_enter) [M68K]: Properly handle more than five syscall arguments. --- diff --git a/syscall.c b/syscall.c index 40eee3ac..ba2185c8 100644 --- a/syscall.c +++ b/syscall.c @@ -2249,6 +2249,18 @@ syscall_enter(struct tcb *tcp) return -1; } } +#elif defined (M68K) + { + int i; + if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1) + tcp->u_nargs = sysent[tcp->scno].nargs; + else + tcp->u_nargs = MAX_ARGS; + for (i = 0; i < tcp->u_nargs; i++) { + if (upeek(tcp, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0) + return -1; + } + } #else /* Other architecture (like i386) (32bits specific) */ { int i;