1 #ifndef __ASM_SH_PTRACE_H
2 #define __ASM_SH_PTRACE_H
5 * Copyright (C) 1999, 2000 Niibe Yutaka
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
46 * This struct defines the way the registers are stored on the
47 * kernel stack during a system call or other kernel entry.
50 unsigned long regs
[16];
61 * This struct defines the way the DSP registers are stored on the
62 * kernel stack during a system call or other kernel entry.
81 #define PTRACE_GETDSPREGS 55
82 #define PTRACE_SETDSPREGS 56
85 #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
86 #define instruction_pointer(regs) ((regs)->pc)
87 extern void show_regs(struct pt_regs
*);
90 #define task_pt_regs(task) \
91 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
92 - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1)
94 #define task_pt_regs(task) \
95 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
96 - sizeof(unsigned long)) - 1)
99 static inline unsigned long profile_pc(struct pt_regs
*regs
)
101 unsigned long pc
= instruction_pointer(regs
);
103 if (pc
>= 0xa0000000UL
&& pc
< 0xc0000000UL
)
109 #endif /* __ASM_SH_PTRACE_H */