X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=arch%2Fcris%2Farch-v10%2Fkernel%2Fptrace.c;h=b570ae9b6cad22396e987508b3bfc3f38d61659f;hp=961c0d58ded4a52ca5313e0ef94e62f8d0adf126;hb=37e58df30063e229ee5157f9d1c1fa1d749917c2;hpb=934a3595b30c986bab52bc9c08d12c8962c88c8a diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index 961c0d58ded4..b570ae9b6cad 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -84,19 +83,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) switch (request) { /* Read word at location address. */ case PTRACE_PEEKTEXT: - 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,datap); + case PTRACE_PEEKDATA: + ret = generic_ptrace_peekdata(child, addr, data); break; - } /* Read the word at location address in the USER area. */ case PTRACE_PEEKUSR: { @@ -114,12 +103,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) /* Write the word at location address. */ case PTRACE_POKETEXT: case PTRACE_POKEDATA: - ret = 0; - - if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data)) - break; - - ret = -EIO; + ret = generic_ptrace_pokedata(child, addr, data); break; /* Write the word at location address in the USER area. */ @@ -193,10 +177,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ret = 0; break; - case PTRACE_DETACH: - ret = ptrace_detach(child, data); - break; - /* Get all GP registers from the child. */ case PTRACE_GETREGS: { int i;