Partial rewrite.
[linux-2.6/linux-mips.git] / include / asm-h8300 / ptrace.h
blob85dc0642df44b2a88c8a99bf9b0a602b6a234733
1 #ifndef _H8300_PTRACE_H
2 #define _H8300_PTRACE_H
4 #ifndef __ASSEMBLY__
6 #define PT_ER1 0
7 #define PT_ER2 1
8 #define PT_ER3 2
9 #define PT_ER4 3
10 #define PT_ER5 4
11 #define PT_ER6 5
12 #define PT_ER0 6
13 #define PT_ORIG_ER0 7
14 #define PT_CCR 8
15 #define PT_PC 9
16 #define PT_USP 10
18 /* this struct defines the way the registers are stored on the
19 stack during a system call. */
21 struct pt_regs {
22 long er3;
23 long er2;
24 long er1;
25 long orig_er0;
26 unsigned short ccr;
27 long er0;
28 long vector;
29 unsigned long pc;
30 } __attribute__((aligned(2),packed));
33 * This is the extended stack used by signal handlers and the context
34 * switcher: it's pushed after the normal "struct pt_regs".
36 struct switch_stack {
37 unsigned long er6;
38 unsigned long er5;
39 unsigned long er4;
40 unsigned long retpc;
43 #define PTRACE_GETREGS 12
44 #define PTRACE_SETREGS 13
46 #ifdef __KERNEL__
47 #ifndef PS_S
48 #define PS_S (0x10)
49 #endif
51 #define user_mode(regs) (!((regs)->ccr & PS_S))
52 #define instruction_pointer(regs) ((regs)->pc)
53 extern void show_regs(struct pt_regs *);
54 #endif /* __KERNEL__ */
55 #endif /* __ASSEMBLY__ */
56 #endif /* _H8300_PTRACE_H */