1 #ifndef __ASM_SH_PTRACE_H
2 #define __ASM_SH_PTRACE_H
7 * Copyright (C) 1999, 2000 Niibe Yutaka
12 * GCC defines register number like this:
13 * -----------------------------
14 * 0 - 15 are integer registers
15 * 17 - 22 are control/special registers
16 * 24 - 39 fp registers
17 * 40 - 47 xd registers
19 * -----------------------------
21 * We follows above, except:
22 * 16 --- program counter (PC)
24 * 23 --- floating point communication register
37 #define REG_SYSCALL 22
40 #define REG_FPREG15 38
42 #define REG_XFREG15 54
47 /* options set using PTRACE_SETOPTIONS */
48 #define PTRACE_O_TRACESYSGOOD 0x00000001
51 * This struct defines the way the registers are stored on the
52 * kernel stack during a system call or other kernel entry.
55 unsigned long regs[16];
66 * This struct defines the way the DSP registers are stored on the
67 * kernel stack during a system call or other kernel entry.
86 #define PTRACE_GETDSPREGS 55
87 #define PTRACE_SETDSPREGS 56
90 #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
91 #define instruction_pointer(regs) ((regs)->pc)
92 extern void show_regs(struct pt_regs *);
95 #define task_pt_regs(task) \
96 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
97 - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1)
99 #define task_pt_regs(task) \
100 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
101 - sizeof(unsigned long)) - 1)
104 static inline unsigned long profile_pc(struct pt_regs *regs)
106 unsigned long pc = instruction_pointer(regs);
108 if (pc >= 0xa0000000UL && pc < 0xc0000000UL)
114 #endif /* __ASM_SH_PTRACE_H */