]> err.no Git - linux-2.6/commitdiff
[SPARC64]: Add dummy PTRACE_PEEKUSR for gdb.
authorDavid S. Miller <davem@sunset.davemloft.net>
Sun, 2 Apr 2006 07:28:10 +0000 (23:28 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 10 Apr 2006 05:56:35 +0000 (22:56 -0700)
GDB uses a PTRACE_PEEKUSR call with offset 0 to see
if a thread is alive, so provide a success return for
this particular special case.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/ptrace.c

index eb93e9c528462c6a2d92a8cb76251b65f91f0db7..c910af5e253836bbe3a6ab819a1eb23739ab1f8f 100644 (file)
@@ -244,6 +244,13 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
        }
 
        switch(request) {
+       case PTRACE_PEEKUSR:
+               if (addr != 0)
+                       pt_error_return(regs, EIO);
+               else
+                       pt_succ_return(regs, 0);
+               goto out_tsk;
+
        case PTRACE_PEEKTEXT: /* read word at location addr. */ 
        case PTRACE_PEEKDATA: {
                unsigned long tmp64;