1 #ifndef __ASM_SH_PTRACE_H
2 #define __ASM_SH_PTRACE_H
5 * Copyright (C) 1999, 2000 Niibe Yutaka
6 * from linux kernel code.
10 * GCC defines register number like this:
11 * -----------------------------
12 * 0 - 15 are integer registers
13 * 17 - 22 are control/special registers
14 * 24 - 39 fp registers
15 * 40 - 47 xd registers
17 * -----------------------------
19 * We follows above, except:
20 * 16 --- program counter (PC)
22 * 23 --- floating point communication register
35 #define REG_SYSCALL 22
38 #define REG_FPREG15 38
40 #define REG_XFREG15 54
45 /* options set using PTRACE_SETOPTIONS */
46 #define PTRACE_O_TRACESYSGOOD 0x00000001
49 * This struct defines the way the registers are stored on the
50 * kernel stack during a system call or other kernel entry.
53 unsigned long regs[16];
64 * This struct defines the way the DSP registers are stored on the
65 * kernel stack during a system call or other kernel entry.
84 #define PTRACE_GETDSPREGS 55
85 #define PTRACE_SETDSPREGS 56
88 #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
89 #define instruction_pointer(regs) ((regs)->pc)
90 extern void show_regs(struct pt_regs *);
93 #define task_pt_regs(task) \
94 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
95 - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1)
97 #define task_pt_regs(task) \
98 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
99 - sizeof(unsigned long)) - 1)
102 static inline unsigned long profile_pc(struct pt_regs *regs)
104 unsigned long pc = instruction_pointer(regs);
106 if (pc >= 0xa0000000UL && pc < 0xc0000000UL)
112 #endif /* __ASM_SH_PTRACE_H */