1 /* Return -1 on error or 1 on success (never 0!). */ 2 static int 3 get_syscall_args(struct tcb *tcp) 4 { 5 /* arg0: a6, arg1: a3, arg2: a4, arg3: a5, arg4: a8, arg5: a9 */ 6 static const int xtensaregs[MAX_ARGS] = { 7 REG_A_BASE + 6, 8 REG_A_BASE + 3, 9 REG_A_BASE + 4, 10 REG_A_BASE + 5, 11 REG_A_BASE + 8, 12 REG_A_BASE + 9 13 }; 14 unsigned int i; 15 16 for (i = 0; i < tcp->s_ent->nargs; ++i) 17 if (upeek(tcp->pid, xtensaregs[i], &tcp->u_arg[i]) < 0) 18 return -1; 19 return 1; 20 } 21