This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: PTRACE_PEEKUSER redux...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]