diff options
Diffstat (limited to 'include/asm-avr32/ptrace.h')
-rw-r--r-- | include/asm-avr32/ptrace.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/asm-avr32/ptrace.h b/include/asm-avr32/ptrace.h index 8c5dba5e33df..9e2d44f4e0fe 100644 --- a/include/asm-avr32/ptrace.h +++ b/include/asm-avr32/ptrace.h | |||
@@ -121,7 +121,15 @@ struct pt_regs { | |||
121 | }; | 121 | }; |
122 | 122 | ||
123 | #ifdef __KERNEL__ | 123 | #ifdef __KERNEL__ |
124 | # define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER) | 124 | |
125 | #include <asm/ocd.h> | ||
126 | |||
127 | #define arch_ptrace_attach(child) ocd_enable(child) | ||
128 | |||
129 | #define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER) | ||
130 | #define instruction_pointer(regs) ((regs)->pc) | ||
131 | #define profile_pc(regs) instruction_pointer(regs) | ||
132 | |||
125 | extern void show_regs (struct pt_regs *); | 133 | extern void show_regs (struct pt_regs *); |
126 | 134 | ||
127 | static __inline__ int valid_user_regs(struct pt_regs *regs) | 135 | static __inline__ int valid_user_regs(struct pt_regs *regs) |
@@ -141,9 +149,6 @@ static __inline__ int valid_user_regs(struct pt_regs *regs) | |||
141 | return 0; | 149 | return 0; |
142 | } | 150 | } |
143 | 151 | ||
144 | #define instruction_pointer(regs) ((regs)->pc) | ||
145 | |||
146 | #define profile_pc(regs) instruction_pointer(regs) | ||
147 | 152 | ||
148 | #endif /* __KERNEL__ */ | 153 | #endif /* __KERNEL__ */ |
149 | 154 | ||