Various fixes for SuperH [SH]:
* mem.c (sys_old_mmap): mmap() parameters passed in registers
* net.c (sys_pipe), syscall.c (getrval2): pipe() results returned
in registers
* process.c (change_syscall): Fixed register which holds system
call number
* util.c (arg0_offset, arg1_offset): provide definition
* Makefile.am: Added new files in linux/sh
* linux/sh/syscallent.h: New file.
* linux/sh/errnoent.h: New file.
* linux/sh/ioctlent.h: New file.
* linux/sh/signalent.h: New file.
return 0;
else
u_arg[i] = v;
-#else // defined(IA64)
+#elif defined(SH)
+ /* SH has always passed the args in registers */
+ int i;
+ for (i=0; i<6; i++)
+ u_arg[i] = tcp->u_arg[i];
+#else
if (umoven(tcp, tcp->u_arg[0], sizeof u_arg, (char *) u_arg) == -1)
return 0;
#endif // defined(IA64)
struct tcb *tcp;
{
-#if defined(LINUX) && !defined(SPARC)
+#if defined(LINUX) && !defined(SPARC) && !defined(SH)
int fds[2];
if (exiting(tcp)) {
else
tprintf("[%u, %u]", fds[0], fds[1]);
}
-#elif defined(SPARC) || defined(SVR4) || defined(FREEBSD)
+#elif defined(SPARC) || defined(SH) || defined(SVR4) || defined(FREEBSD)
if (exiting(tcp))
tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp));
#endif
if (ptrace(PTRACE_GETREGS,tcp->pid,(char *)®s,0) < 0)
return -1;
val = regs.r_o1;
+#elif defined(SH)
+ if (upeek(tcp->pid, 4*(REG_REG0+1), &val) < 0)
+ return -1;
#endif /* SPARC */
#endif /* LINUX */