2 * Taken from the m68k port.
4 * Copyright (C) 2004, Microtronix Datacom Ltd.
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
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
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.*/
88 unsigned long orig_r2
;
93 unsigned long estatus
;
94 unsigned long status_extension
;
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
{
117 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
118 #define PTRACE_GETREGS 12
119 #define PTRACE_SETREGS 13
121 #define PTRACE_GETFPREGS 14
122 #define PTRACE_SETFPREGS 15
128 #define PS_S (0x00000001)
131 #define PS_T (0x00000002)
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 */