This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH]: PTRACE_PEEKUSER redux...
- From: Daniel Jacobowitz <drow at false dot org>
- To: "David S. Miller" <davem at davemloft dot net>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 7 Apr 2006 09:16:23 -0400
- Subject: Re: [PATCH]: PTRACE_PEEKUSER redux...
- References: <20060406.220357.102230498.davem@davemloft.net>
On Thu, Apr 06, 2006 at 10:03:57PM -0700, David S. Miller wrote:
> In all cases, no matter what ptrace operation is specified, if the
> child does not exist the error return we will get is -ESRCH (task not
> found for pid) or -EPERM (trying to trace init or similar).
This relies on all platforms doing the permission check before the
operation check. Well, I guess it's still better than what we had
before, right?
> 2006-04-06 David S. Miller <davem@sunset.davemloft.net>
>
> * linux-nat.c (linux_nat_thread_alive): Thread is alive
> as long as errno is neither -ESRCH nor -EPERM. This allows
> to handle cleanly the case where PTRACE_PEEKUSER is not
> a supported ptrace operation for a given Linux target.
OK, except, please reverse the changelog and the patch :-) This
comment should be in the source code, or we'll break it again later.
--
Daniel Jacobowitz
CodeSourcery