2 * BK Id: SCCS/s.ptrace.h 1.14 09/02/02 12:29:58 paulus
8 * This struct defines the way the registers are stored on the
9 * kernel stack during a system call or other kernel entry.
11 * this should only contain volatile regs
12 * since we can keep non-volatile in the thread_struct
13 * should set this up when only volatiles are saved
16 * Since this is going on the stack, *CARE MUST BE TAKEN* to insure
17 * that the overall structure is a multiple of 16 bytes in length.
19 * Note that the offsets of the fields in this struct correspond with
20 * the PT_* values below. This simplifies arch/ppc/kernel/ptrace.c.
25 unsigned long gpr[32];
28 unsigned long orig_gpr3; /* Used for restarting system calls */
33 unsigned long mq; /* 601 only (not used at present) */
34 /* Used on APUS to hold IPL value. */
35 unsigned long trap; /* Reason for being here */
36 unsigned long dar; /* Fault registers */
38 unsigned long result; /* Result of a system call */
42 /* iSeries uses mq field for soft enable flag */
46 #define STACK_FRAME_OVERHEAD 16 /* size of minimum stack frame */
48 /* Size of stack frame allocated when calling signal handler. */
49 #define __SIGNAL_FRAMESIZE 64
51 #define instruction_pointer(regs) ((regs)->nip)
52 #define user_mode(regs) (((regs)->msr & MSR_PR) != 0)
54 #endif /* __KERNEL__ */
57 * Offsets used by 'ptrace' system call interface.
58 * These can't be changed without breaking binary compatibility
105 #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */
106 #define PT_FPR31 (PT_FPR0 + 2*31)
107 #define PT_FPSCR (PT_FPR0 + 2*32 + 1)
109 /* Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go */
110 #define PTRACE_GETVRREGS 18
111 #define PTRACE_SETVRREGS 19