1 /* Return -1 on error or 1 on success (never 0!). */ 2 static int get_syscall_args(struct tcb * tcp)3get_syscall_args(struct tcb *tcp) 4 { 5 static const int crisregs[MAX_ARGS] = { 6 4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12, 7 4*PT_R13 , 4*PT_MOF, 4*PT_SRP 8 }; 9 unsigned int i; 10 11 for (i = 0; i < tcp->s_ent->nargs; ++i) 12 if (upeek(tcp->pid, crisregs[i], &tcp->u_arg[i]) < 0) 13 return -1; 14 return 1; 15 } 16