From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21210 invoked by alias); 14 Feb 2011 19:46:24 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 21196 invoked by uid 22791); 14 Feb 2011 19:46:22 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Mon, 14 Feb 2011 19:46:00 -0000 From: Oleg Nesterov To: Roland McGrath Cc: Project Archer Subject: Re: ptrace improvement: PTRACE_O_INHERIT Message-ID: <20110214193812.GA20765@redhat.com> References: <20110203223905.D0C77180081@magilla.sf.frob.com> <20110210195212.GA3868@redhat.com> <20110211192423.78FFC1802A2@magilla.sf.frob.com> <20110211203755.GA5367@redhat.com> <20110212005855.E764C1814A4@magilla.sf.frob.com> <20110212190253.GA31866@redhat.com> <20110214193052.3EC8D1814BA@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110214193052.3EC8D1814BA@magilla.sf.frob.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-SW-Source: 2011-q1/txt/msg00051.txt.bz2 On 02/14, Roland McGrath wrote: > > > > > I meant, we can intoduce the new W*** flag for do_wait(). If the new > > > > tracee was PTRACE_O_INHERIT'ed, do_wait() returns its pid. > > > > > > I still don't understand the proposal. > > > > To simplify the explanation, suppose we add task_struct->unknown_tracee > > boolean. > > > > if tracehook_finish_clone()->ptrace_init_task() does __ptrace_link() > > because of PTRACE_O_INHERIT, it also sets child->unknown_tracee and > > notifies the tracee via do_notify_parent_cldstop(). > > So the suggestion is to have the tracer see a wait report that simply says > "here is a new implicit tracee". I don't see how that is useful at all. OK, lets forget then. > > > Tracing some threads but not all is really an artifact of the ptrace > > > interface and not something that any real userland debugger-like thing > > > ever wants to do. > > > > Off-topic note: I disagree very much, but this doesn't matter. I agree > > that ptrace nterface should not be per-thread, and gdb always traces all > > threads. > > Then I don't understand at all what you are disagreeing with. > You think the interface should not be per-thread, but you don't agree > that a per-thread interface is not something debuggers really want? I meant, I do not agree that it never makes sense to trace, say, a single thread from the thread group. But since we are talking about gdb my noncompliance is off-topic. Oleg.