MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-nios2nommu / ptrace.h
blobc4e20c3ecc1f788134aa5bc0602895d382439eba
1 /*
2 * Taken from the m68k port.
4 * Copyright (C) 2004, Microtronix Datacom Ltd.
6 * All rights reserved.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
16 * NON INFRINGEMENT. See the GNU General Public License for more
17 * details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _NIOS2NOMMU_PTRACE_H
25 #define _NIOS2NOMMU_PTRACE_H
27 #ifndef __ASSEMBLY__
29 #define PTR_R0 0
30 #define PTR_R1 1
31 #define PTR_R2 2
32 #define PTR_R3 3
33 #define PTR_R4 4
34 #define PTR_R5 5
35 #define PTR_R6 6
36 #define PTR_R7 7
37 #define PTR_R8 8
38 #define PTR_R9 9
39 #define PTR_R10 10
40 #define PTR_R11 11
41 #define PTR_R12 12
42 #define PTR_R13 13
43 #define PTR_R14 14
44 #define PTR_R15 15
45 #define PTR_R16 16
46 #define PTR_R17 17
47 #define PTR_R18 18
48 #define PTR_R19 19
49 #define PTR_R20 20
50 #define PTR_R21 21
51 #define PTR_R22 22
52 #define PTR_R23 23
53 #define PTR_R24 24
54 #define PTR_R25 25
55 #define PTR_GP 26
56 #define PTR_SP 27
57 #define PTR_FP 28
58 #define PTR_EA 29
59 #define PTR_BA 30
60 #define PTR_RA 31
61 #define PTR_STATUS 32
62 #define PTR_ESTATUS 33
63 #define PTR_BSTATUS 34
64 #define PTR_IENABLE 35
65 #define PTR_IPENDING 36
67 /* this struct defines the way the registers are stored on the
68 stack during a system call.
70 There is a fake_regs in setup.c that has to match pt_regs.*/
72 struct pt_regs {
73 unsigned long r8;
74 unsigned long r9;
75 unsigned long r10;
76 unsigned long r11;
77 unsigned long r12;
78 unsigned long r13;
79 unsigned long r14;
80 unsigned long r15;
81 unsigned long r1;
82 unsigned long r2;
83 unsigned long r3;
84 unsigned long r4;
85 unsigned long r5;
86 unsigned long r6;
87 unsigned long r7;
88 unsigned long orig_r2;
89 unsigned long ra;
90 unsigned long fp;
91 unsigned long sp;
92 unsigned long gp;
93 unsigned long estatus;
94 unsigned long status_extension;
95 unsigned long ea;
100 * This is the extended stack used by signal handlers and the context
101 * switcher: it's pushed after the normal "struct pt_regs".
103 struct switch_stack {
104 unsigned long r16;
105 unsigned long r17;
106 unsigned long r18;
107 unsigned long r19;
108 unsigned long r20;
109 unsigned long r21;
110 unsigned long r22;
111 unsigned long r23;
112 unsigned long fp;
113 unsigned long gp;
114 unsigned long ra;
117 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
118 #define PTRACE_GETREGS 12
119 #define PTRACE_SETREGS 13
120 #ifdef CONFIG_FPU
121 #define PTRACE_GETFPREGS 14
122 #define PTRACE_SETFPREGS 15
123 #endif
125 #ifdef __KERNEL__
127 #ifndef PS_S
128 #define PS_S (0x00000001)
129 #endif
130 #ifndef PS_T
131 #define PS_T (0x00000002)
132 #endif
134 #define user_mode(regs) (!((regs)->status_extension & PS_S))
135 #define instruction_pointer(regs) ((regs)->ra)
136 #define profile_pc(regs) instruction_pointer(regs)
137 extern void show_regs(struct pt_regs *);
139 #endif /* __KERNEL__ */
140 #endif /* __ASSEMBLY__ */
141 #endif /* _NIOS2NOMMU_PTRACE_H */