]> err.no Git - linux-2.6/commitdiff
[SPARC64]: Translate PTRACE_GETEVENTMSG for 32-bit tasks.
authorDavid S. Miller <davem@sunset.davemloft.net>
Tue, 4 Apr 2006 23:54:40 +0000 (16:54 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 10 Apr 2006 05:56:41 +0000 (22:56 -0700)
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/ptrace.c

index c910af5e253836bbe3a6ab819a1eb23739ab1f8f..49e6dedd027d603b9b1788af35f38fb27a452515 100644 (file)
@@ -609,6 +609,22 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
 
        /* PTRACE_DUMPCORE unsupported... */
 
+       case PTRACE_GETEVENTMSG: {
+               int err;
+
+               if (test_thread_flag(TIF_32BIT))
+                       err = put_user(child->ptrace_message,
+                                      (unsigned int __user *) data);
+               else
+                       err = put_user(child->ptrace_message,
+                                      (unsigned long __user *) data);
+               if (err)
+                       pt_error_return(regs, -err);
+               else
+                       pt_succ_return(regs, 0);
+               break;
+       }
+
        default: {
                int err = ptrace_request(child, request, addr, data);
                if (err)