Dmitry V. Levin
5503dd28c6
* regs.h: New file. * Makefile.am (strace_SOURCES): Add it. * linux/arch_regs.h: New file. * linux/alpha/arch_regs.h: Likewise. * linux/arm/arch_regs.h: Likewise. * linux/hppa/arch_regs.h: Likewise. * linux/i386/arch_regs.h: Likewise. * linux/ia64/arch_regs.h: Likewise. * linux/mips/arch_regs.h: Likewise. * linux/powerpc/arch_regs.h: Likewise. * linux/sh64/arch_regs.h: Likewise. * linux/sparc/arch_regs.h: Likewise. * linux/sparc64/arch_regs.h: Likewise. * linux/tile/arch_regs.h: Likewise. * linux/x86_64/arch_regs.h: Likewise. * Makefile.am (EXTRA_DIST): Add them. * defs.h: Remove definitions of PTRACE_*, REG_*, PT_*, U_REG_*, and ARM_* macros. Remove declarations of struct pt_regs variables. [SPARC]: Do not include <asm/psr.h>. [SPARC64]: Do not include <asm/psrcompat.h>. * bjm.c: Do not include <sys/user.h>. * process.c: Include "regs.h". Do not include <sys/user.h> and <sys/reg.h>. [IA64]: Do not include <asm/ptrace_offsets.h> and <asm/rse.h>. * util.c: Likewise. * syscall.c: Likewise. [AARCH64]: Define struct arm_pt_regs and ARM_* macros. [SPARC]: Include <asm/psr.h>. [SPARC64]: Include <asm/psrcompat.h>. * signal.c: Include "regs.h". Do not include <sys/user.h> and <sys/reg.h>. [IA64]: Do not include <asm/ptrace_offsets.h>. * strace.c [IA64]: Do not include <asm/ptrace_offsets.h>.
16 lines
548 B
C
16 lines
548 B
C
/* SH64 Linux - this code assumes the following kernel API for system calls:
|
|
PC Offset 0
|
|
System Call Offset 16 (actually, (syscall no.) | (0x1n << 16),
|
|
where n = no. of parameters.
|
|
Other regs Offset 24+
|
|
|
|
On entry: R2-7 = parameters 1-6 (as many as necessary)
|
|
On return: R9 = result.
|
|
*/
|
|
|
|
/* Offset for peeks of registers */
|
|
#define REG_OFFSET (24)
|
|
#define REG_GENERAL(x) (8*(x)+REG_OFFSET)
|
|
#define REG_PC (0*8)
|
|
#define REG_SYSCALL (2*8)
|