diff options
Diffstat (limited to 'arch/h8300/kernel/ptrace.c')
-rw-r--r-- | arch/h8300/kernel/ptrace.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c index d32bbf02fc48..04bb9dd194ec 100644 --- a/arch/h8300/kernel/ptrace.c +++ b/arch/h8300/kernel/ptrace.c | |||
@@ -42,14 +42,6 @@ extern void h8300_enable_trace(struct task_struct *child); | |||
42 | * in exit.c or in signal.c. | 42 | * in exit.c or in signal.c. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | inline | ||
46 | static int read_long(struct task_struct * tsk, unsigned long addr, | ||
47 | unsigned long * result) | ||
48 | { | ||
49 | *result = *(unsigned long *)addr; | ||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | void ptrace_disable(struct task_struct *child) | 45 | void ptrace_disable(struct task_struct *child) |
54 | { | 46 | { |
55 | h8300_disable_trace(child); | 47 | h8300_disable_trace(child); |
@@ -60,17 +52,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
60 | int ret; | 52 | int ret; |
61 | 53 | ||
62 | switch (request) { | 54 | switch (request) { |
63 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | ||
64 | case PTRACE_PEEKDATA: { | ||
65 | unsigned long tmp; | ||
66 | |||
67 | ret = read_long(child, addr, &tmp); | ||
68 | if (ret < 0) | ||
69 | break ; | ||
70 | ret = put_user(tmp, (unsigned long *) data); | ||
71 | break ; | ||
72 | } | ||
73 | |||
74 | /* read the word at location addr in the USER area. */ | 55 | /* read the word at location addr in the USER area. */ |
75 | case PTRACE_PEEKUSR: { | 56 | case PTRACE_PEEKUSR: { |
76 | unsigned long tmp = 0; | 57 | unsigned long tmp = 0; |
@@ -109,11 +90,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
109 | } | 90 | } |
110 | 91 | ||
111 | /* when I and D space are separate, this will have to be fixed. */ | 92 | /* when I and D space are separate, this will have to be fixed. */ |
112 | case PTRACE_POKETEXT: /* write the word at location addr. */ | ||
113 | case PTRACE_POKEDATA: | ||
114 | ret = generic_ptrace_pokedata(child, addr, data); | ||
115 | break; | ||
116 | |||
117 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | 93 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
118 | if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) { | 94 | if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) { |
119 | ret = -EIO; | 95 | ret = -EIO; |
@@ -175,10 +151,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
175 | break; | 151 | break; |
176 | } | 152 | } |
177 | 153 | ||
178 | case PTRACE_DETACH: /* detach a process that was attached. */ | ||
179 | ret = ptrace_detach(child, data); | ||
180 | break; | ||
181 | |||
182 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | 154 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ |
183 | int i; | 155 | int i; |
184 | unsigned long tmp; | 156 | unsigned long tmp; |
@@ -210,7 +182,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
210 | } | 182 | } |
211 | 183 | ||
212 | default: | 184 | default: |
213 | ret = -EIO; | 185 | ret = ptrace_request(child, request, addr, data); |
214 | break; | 186 | break; |
215 | } | 187 | } |
216 | return ret; | 188 | return ret; |