diff options
Diffstat (limited to 'arch/m68knommu/kernel/ptrace.c')
-rw-r--r-- | arch/m68knommu/kernel/ptrace.c | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 85ed2f988f98..f6be1248d216 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c | |||
@@ -116,12 +116,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
116 | int ret; | 116 | int ret; |
117 | 117 | ||
118 | switch (request) { | 118 | switch (request) { |
119 | /* when I and D space are separate, these will need to be fixed. */ | ||
120 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | ||
121 | case PTRACE_PEEKDATA: | ||
122 | ret = generic_ptrace_peekdata(child, addr, data); | ||
123 | break; | ||
124 | |||
125 | /* read the word at location addr in the USER area. */ | 119 | /* read the word at location addr in the USER area. */ |
126 | case PTRACE_PEEKUSR: { | 120 | case PTRACE_PEEKUSR: { |
127 | unsigned long tmp; | 121 | unsigned long tmp; |
@@ -160,12 +154,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
160 | break; | 154 | break; |
161 | } | 155 | } |
162 | 156 | ||
163 | /* when I and D space are separate, this will have to be fixed. */ | ||
164 | case PTRACE_POKETEXT: /* write the word at location addr. */ | ||
165 | case PTRACE_POKEDATA: | ||
166 | ret = generic_ptrace_pokedata(child, addr, data); | ||
167 | break; | ||
168 | |||
169 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | 157 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
170 | ret = -EIO; | 158 | ret = -EIO; |
171 | if ((addr & 3) || addr < 0 || | 159 | if ((addr & 3) || addr < 0 || |
@@ -202,66 +190,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
202 | } | 190 | } |
203 | break; | 191 | break; |
204 | 192 | ||
205 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | ||
206 | case PTRACE_CONT: { /* restart after signal. */ | ||
207 | long tmp; | ||
208 | |||
209 | ret = -EIO; | ||
210 | if (!valid_signal(data)) | ||
211 | break; | ||
212 | if (request == PTRACE_SYSCALL) | ||
213 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
214 | else | ||
215 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
216 | child->exit_code = data; | ||
217 | /* make sure the single step bit is not set. */ | ||
218 | tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); | ||
219 | put_reg(child, PT_SR, tmp); | ||
220 | wake_up_process(child); | ||
221 | ret = 0; | ||
222 | break; | ||
223 | } | ||
224 | |||
225 | /* | ||
226 | * make the child exit. Best I can do is send it a sigkill. | ||
227 | * perhaps it should be put in the status that it wants to | ||
228 | * exit. | ||
229 | */ | ||
230 | case PTRACE_KILL: { | ||
231 | long tmp; | ||
232 | |||
233 | ret = 0; | ||
234 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
235 | break; | ||
236 | child->exit_code = SIGKILL; | ||
237 | /* make sure the single step bit is not set. */ | ||
238 | tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); | ||
239 | put_reg(child, PT_SR, tmp); | ||
240 | wake_up_process(child); | ||
241 | break; | ||
242 | } | ||
243 | |||
244 | case PTRACE_SINGLESTEP: { /* set the trap flag. */ | ||
245 | long tmp; | ||
246 | |||
247 | ret = -EIO; | ||
248 | if (!valid_signal(data)) | ||
249 | break; | ||
250 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
251 | tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); | ||
252 | put_reg(child, PT_SR, tmp); | ||
253 | |||
254 | child->exit_code = data; | ||
255 | /* give it a chance to run. */ | ||
256 | wake_up_process(child); | ||
257 | ret = 0; | ||
258 | break; | ||
259 | } | ||
260 | |||
261 | case PTRACE_DETACH: /* detach a process that was attached. */ | ||
262 | ret = ptrace_detach(child, data); | ||
263 | break; | ||
264 | |||
265 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | 193 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ |
266 | int i; | 194 | int i; |
267 | unsigned long tmp; | 195 | unsigned long tmp; |
@@ -325,7 +253,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
325 | break; | 253 | break; |
326 | 254 | ||
327 | default: | 255 | default: |
328 | ret = -EIO; | 256 | ret = ptrace_request(child, request, addr, data); |
329 | break; | 257 | break; |
330 | } | 258 | } |
331 | return ret; | 259 | return ret; |