PTRACE_PEEKDATA consolidation
[linux-2.6-block.git] / arch / sh / kernel / ptrace.c
index f2eaa485d04d3d5e4ae320aba5eb614a9b99c814..f23f949576a52b106c1a4dfc82be5de89d4c6c39 100644 (file)
@@ -91,17 +91,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        switch (request) {
        /* when I and D space are separate, these will need to be fixed. */
        case PTRACE_PEEKTEXT: /* read word at location addr. */
-       case PTRACE_PEEKDATA: {
-               unsigned long tmp;
-               int copied;
-
-               copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
-               ret = -EIO;
-               if (copied != sizeof(tmp))
-                       break;
-               ret = put_user(tmp,(unsigned long __user *) data);
-               break;
-       }
+       case PTRACE_PEEKDATA:
+               ret = generic_ptrace_peekdata(child, addr, data);
 
        /* read the word at location addr in the USER area. */
        case PTRACE_PEEKUSR: {