strace/linux/bfin/get_scno.c

14 lines
289 B
C
Raw Normal View History

/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
/* Return codes: 1 - ok, 0 - ignore, other - error. */
static int
arch_get_scno(struct tcb *tcp)
{
Change the first argument of upeek from pid to tcp All users were changed automatically by: for i in `git grep -l 'upeek(tcp->pid'`; do \ sed -i 's/upeek(tcp->pid/upeek(tcp/g' "$i"; \ done * upeek.c (upeek): Change the first argument from pid_t pid to struct tcb *tcp. Use tcp->pid instead of pid in the function's body. * defs.h (upeek): Update declaration. * linux/alpha/arch_getrval2.c: Pass tcp instead of tcp->pid to the upeek calls. * linux/alpha/arch_rt_sigframe.c: Likewise. * linux/alpha/arch_sigreturn.c: Likewise. * linux/alpha/get_scno.c: Likewise. * linux/alpha/get_syscall_args.c: Likewise. * linux/alpha/get_syscall_result.c: Likewise. * linux/bfin/arch_rt_sigframe.c: Likewise. * linux/bfin/get_scno.c: Likewise. * linux/bfin/get_syscall_args.c: Likewise. * linux/bfin/get_syscall_result.c: Likewise. * linux/crisv10/arch_rt_sigframe.c: Likewise. * linux/crisv10/get_scno.c: Likewise. * linux/crisv10/get_syscall_args.c: Likewise. * linux/crisv10/get_syscall_result.c: Likewise. * linux/hppa/arch_rt_sigframe.c: Likewise. * linux/hppa/get_scno.c: Likewise. * linux/hppa/get_syscall_args.c: Likewise. * linux/hppa/get_syscall_result.c: Likewise. * linux/microblaze/arch_rt_sigframe.c: Likewise. * linux/microblaze/arch_sigreturn.c: Likewise. * linux/microblaze/get_scno.c: Likewise. * linux/microblaze/get_syscall_args.c: Likewise. * linux/microblaze/get_syscall_result.c: Likewise. * linux/powerpc/getregs_old.c: Likewise. * linux/sh/arch_getrval2.c: Likewise. * linux/sh/arch_rt_sigframe.c: Likewise. * linux/sh/get_scno.c: Likewise. * linux/sh/get_syscall_args.c: Likewise. * linux/sh/get_syscall_result.c: Likewise. * linux/sh64/get_scno.c: Likewise. * linux/sh64/get_syscall_args.c: Likewise. * linux/sh64/get_syscall_result.c: Likewise. * linux/xtensa/arch_rt_sigframe.c: Likewise. * linux/xtensa/get_scno.c: Likewise. * linux/xtensa/get_syscall_args.c: Likewise. * linux/xtensa/get_syscall_result.c: Likewise. * syscall.c: Likewise.
2017-12-26 01:52:48 +03:00
return upeek(tcp, PT_ORIG_P0, &tcp->scno) < 0 ? -1 : 1;
}