aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu/kernel/ptrace.c')
-rw-r--r--arch/m68knommu/kernel/ptrace.c47
1 files changed, 13 insertions, 34 deletions
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index f6be1248d21..6fe7c38cd55 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -18,6 +18,7 @@
18#include <linux/ptrace.h> 18#include <linux/ptrace.h>
19#include <linux/user.h> 19#include <linux/user.h>
20#include <linux/signal.h> 20#include <linux/signal.h>
21#include <linux/tracehook.h>
21 22
22#include <asm/uaccess.h> 23#include <asm/uaccess.h>
23#include <asm/page.h> 24#include <asm/page.h>
@@ -134,14 +135,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
134 tmp >>= 16; 135 tmp >>= 16;
135 } else if (addr >= 21 && addr < 49) { 136 } else if (addr >= 21 && addr < 49) {
136 tmp = child->thread.fp[addr - 21]; 137 tmp = child->thread.fp[addr - 21];
137#ifdef CONFIG_M68KFPU_EMU
138 /* Convert internal fpu reg representation
139 * into long double format
140 */
141 if (FPU_IS_EMU && (addr < 45) && !(addr % 3))
142 tmp = ((tmp & 0xffff0000) << 15) |
143 ((tmp & 0x0000ffff) << 16);
144#endif
145 } else if (addr == 49) { 138 } else if (addr == 49) {
146 tmp = child->mm->start_code; 139 tmp = child->mm->start_code;
147 } else if (addr == 50) { 140 } else if (addr == 50) {
@@ -175,16 +168,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
175 } 168 }
176 if (addr >= 21 && addr < 48) 169 if (addr >= 21 && addr < 48)
177 { 170 {
178#ifdef CONFIG_M68KFPU_EMU
179 /* Convert long double format
180 * into internal fpu reg representation
181 */
182 if (FPU_IS_EMU && (addr < 45) && !(addr % 3)) {
183 data = (unsigned long)data << 15;
184 data = (data & 0xffff0000) |
185 ((data & 0x0000ffff) >> 1);
186 }
187#endif
188 child->thread.fp[addr - 21] = data; 171 child->thread.fp[addr - 21] = data;
189 ret = 0; 172 ret = 0;
190 } 173 }
@@ -259,21 +242,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
259 return ret; 242 return ret;
260} 243}
261 244
262asmlinkage void syscall_trace(void) 245asmlinkage int syscall_trace_enter(void)
263{ 246{
264 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 247 int ret = 0;
265 return; 248
266 if (!(current->ptrace & PT_PTRACED)) 249 if (test_thread_flag(TIF_SYSCALL_TRACE))
267 return; 250 ret = tracehook_report_syscall_entry(task_pt_regs(current));
268 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) 251 return ret;
269 ? 0x80 : 0)); 252}
270 /* 253
271 * this isn't the same as continuing with a signal, but it will do 254asmlinkage void syscall_trace_leave(void)
272 * for normal use. strace only continues with a signal if the 255{
273 * stopping signal is not SIGTRAP. -brl 256 if (test_thread_flag(TIF_SYSCALL_TRACE))
274 */ 257 tracehook_report_syscall_exit(task_pt_regs(current), 0);
275 if (current->exit_code) {
276 send_sig(current->exit_code, current, 1);
277 current->exit_code = 0;
278 }
279} 258}