[PATCH] m68k: switch to PTRACE_GETREGS

Dmitry V. Levin ldv at altlinux.org
Sun Nov 13 22:49:12 UTC 2016


On Sat, Nov 12, 2016 at 08:02:23PM +0100, Andreas Schwab wrote:
> * Makefile.am (EXTRA_DIST): Add linux/m68k/arch_regs.h, remove
> linux/m68k/get_syscall_result.c.
> * linux/m68k/arch_regs.c (m68k_d0, ARCH_PC_PEEK_ADDR): Don't
> define.
> (m68k_regs, m68k_usp_ptr, ARCH_PC_REG, ARCH_REGS_FOR_GETREGS):
> Define.
> * linux/m68k/arch_regs.h: New file.
> * linux/m68k/arch_sigreturn.c (arch_sigreturn): Use m68k_usp_ptr.
> * linux/m68k/get_error.c (get_error): Use m68k_regs.d0.
> * linux/m68k/get_scno.c (arch_get_scno): Use m68k_regs.orig_d0.
> * linux/m68k/get_syscall_args.c (get_syscall_args): Use m68k_regs.
> * linux/m68k/get_syscall_result.c: Remove.

Applied, thanks.

[...]
> --- a/linux/m68k/get_scno.c
> +++ b/linux/m68k/get_scno.c
> @@ -2,5 +2,6 @@
>  static int
>  arch_get_scno(struct tcb *tcp)
>  {
> -	return upeek(tcp->pid, 4 * PT_ORIG_D0, &tcp->scno) < 0 ? -1 : 1;
> +	tcp->scno = m68k_regs.orig_d0;
> +	return 1;
>  }

BTW, is there any way of changing syscall number on this architecture?

The upcoming syscall fault injection feature won't be available for m68k
without a proper support by the kernel.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20161114/13475a0d/attachment.bin>


More information about the Strace-devel mailing list