strace/linux/crisv10/get_syscall_args.c

16 lines
360 B
C
Raw Normal View History

cleanup: make get_syscall_args.c files more readable Make get_syscall_args.c files more self-contained. While they are still being included by syscall.c, the latter no longer defines get_syscall_args function. * linux/aarch64/get_syscall_args.c: Include "arm/get_syscall_args.c" with get_syscall_args temporarily defined to arm_get_syscall_args. (get_syscall_args): Define. * linux/alpha/get_syscall_args.c (get_syscall_args): Define. * linux/arc/get_syscall_args.c: Likewise. * linux/arm/get_syscall_args.c: Likewise. * linux/avr32/get_syscall_args.c: Likewise. * linux/bfin/get_syscall_args.c: Likewise. * linux/crisv10/get_syscall_args.c: Likewise. * linux/hppa/get_syscall_args.c: Likewise. * linux/i386/get_syscall_args.c: Likewise. * linux/ia64/get_syscall_args.c: Likewise. * linux/m68k/get_syscall_args.c: Likewise. * linux/metag/get_syscall_args.c: Likewise. * linux/microblaze/get_syscall_args.c: Likewise. * linux/mips/get_syscall_args.c: Likewise. * linux/nios2/get_syscall_args.c: Likewise. * linux/or1k/get_syscall_args.c: Likewise. * linux/powerpc/get_syscall_args.c: Likewise. * linux/s390/get_syscall_args.c: Likewise. * linux/sh/get_syscall_args.c: Likewise. * linux/sh64/get_syscall_args.c: Likewise. * linux/sparc/get_syscall_args.c: Likewise. * linux/tile/get_syscall_args.c: Likewise. * linux/x86_64/get_syscall_args.c: Likewise. * linux/xtensa/get_syscall_args.c: Likewise. * syscall.c (get_syscall_args): Remove. Include "get_syscall_args.c" in file scope. Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-11-30 03:57:14 +03:00
/* Return -1 on error or 1 on success (never 0!). */
static int
get_syscall_args(struct tcb *tcp)
{
static const int crisregs[MAX_ARGS] = {
4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12,
4*PT_R13 , 4*PT_MOF, 4*PT_SRP
};
unsigned int i;
cleanup: make get_syscall_args.c files more readable Make get_syscall_args.c files more self-contained. While they are still being included by syscall.c, the latter no longer defines get_syscall_args function. * linux/aarch64/get_syscall_args.c: Include "arm/get_syscall_args.c" with get_syscall_args temporarily defined to arm_get_syscall_args. (get_syscall_args): Define. * linux/alpha/get_syscall_args.c (get_syscall_args): Define. * linux/arc/get_syscall_args.c: Likewise. * linux/arm/get_syscall_args.c: Likewise. * linux/avr32/get_syscall_args.c: Likewise. * linux/bfin/get_syscall_args.c: Likewise. * linux/crisv10/get_syscall_args.c: Likewise. * linux/hppa/get_syscall_args.c: Likewise. * linux/i386/get_syscall_args.c: Likewise. * linux/ia64/get_syscall_args.c: Likewise. * linux/m68k/get_syscall_args.c: Likewise. * linux/metag/get_syscall_args.c: Likewise. * linux/microblaze/get_syscall_args.c: Likewise. * linux/mips/get_syscall_args.c: Likewise. * linux/nios2/get_syscall_args.c: Likewise. * linux/or1k/get_syscall_args.c: Likewise. * linux/powerpc/get_syscall_args.c: Likewise. * linux/s390/get_syscall_args.c: Likewise. * linux/sh/get_syscall_args.c: Likewise. * linux/sh64/get_syscall_args.c: Likewise. * linux/sparc/get_syscall_args.c: Likewise. * linux/tile/get_syscall_args.c: Likewise. * linux/x86_64/get_syscall_args.c: Likewise. * linux/xtensa/get_syscall_args.c: Likewise. * syscall.c (get_syscall_args): Remove. Include "get_syscall_args.c" in file scope. Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-11-30 03:57:14 +03:00
for (i = 0; i < tcp->s_ent->nargs; ++i)
if (upeek(tcp->pid, crisregs[i], &tcp->u_arg[i]) < 0)
return -1;
return 1;
}