diff options
Diffstat (limited to 'include/asm-sparc/ptrace.h')
-rw-r--r-- | include/asm-sparc/ptrace.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h index 8201a7b29d49..11f3bc2bb3f5 100644 --- a/include/asm-sparc/ptrace.h +++ b/include/asm-sparc/ptrace.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ptrace.h,v 1.25 1997/03/04 16:27:25 jj Exp $ */ | ||
2 | #ifndef _SPARC_PTRACE_H | 1 | #ifndef _SPARC_PTRACE_H |
3 | #define _SPARC_PTRACE_H | 2 | #define _SPARC_PTRACE_H |
4 | 3 | ||
@@ -10,6 +9,8 @@ | |||
10 | 9 | ||
11 | #ifndef __ASSEMBLY__ | 10 | #ifndef __ASSEMBLY__ |
12 | 11 | ||
12 | #include <linux/types.h> | ||
13 | |||
13 | struct pt_regs { | 14 | struct pt_regs { |
14 | unsigned long psr; | 15 | unsigned long psr; |
15 | unsigned long pc; | 16 | unsigned long pc; |
@@ -39,6 +40,16 @@ struct pt_regs { | |||
39 | #define UREG_FP UREG_I6 | 40 | #define UREG_FP UREG_I6 |
40 | #define UREG_RETPC UREG_I7 | 41 | #define UREG_RETPC UREG_I7 |
41 | 42 | ||
43 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
44 | { | ||
45 | return (regs->psr & PSR_SYSCALL); | ||
46 | } | ||
47 | |||
48 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
49 | { | ||
50 | return (regs->psr &= ~PSR_SYSCALL); | ||
51 | } | ||
52 | |||
42 | /* A register window */ | 53 | /* A register window */ |
43 | struct reg_window { | 54 | struct reg_window { |
44 | unsigned long locals[8]; | 55 | unsigned long locals[8]; |
@@ -149,6 +160,7 @@ extern void show_regs(struct pt_regs *); | |||
149 | #define SF_XXARG 0x5c | 160 | #define SF_XXARG 0x5c |
150 | 161 | ||
151 | /* Stuff for the ptrace system call */ | 162 | /* Stuff for the ptrace system call */ |
163 | #define PTRACE_SPARC_DETACH 11 | ||
152 | #define PTRACE_GETREGS 12 | 164 | #define PTRACE_GETREGS 12 |
153 | #define PTRACE_SETREGS 13 | 165 | #define PTRACE_SETREGS 13 |
154 | #define PTRACE_GETFPREGS 14 | 166 | #define PTRACE_GETFPREGS 14 |