From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: linux-next: add utrace tree Date: Tue, 26 Jan 2010 22:53:49 +0100 Message-ID: <20100126215349.GB19146@redhat.com> References: <20100122221348.GA4263@redhat.com> <877hr4g49l.fsf@basil.nowhere.org> <20100126210232.GF6567@basil.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8992 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754761Ab0AZVyz (ORCPT ); Tue, 26 Jan 2010 16:54:55 -0500 Content-Disposition: inline In-Reply-To: <20100126210232.GF6567@basil.fritz.box> Sender: linux-next-owner@vger.kernel.org List-ID: To: Andi Kleen Cc: Linus Torvalds , tromey@redhat.com, Stephen Rothwell , Kyle Moffett , Peter Zijlstra , Peter Zijlstra , Fr??d??ric Weisbecker , Steven Rostedt , LKML , Arnaldo Carvalho de Melo , "Frank Ch. Eigler" , linux-next@vger.kernel.org, "H. Peter Anvin" , utrace-devel@redhat.com, Thomas Gleixner On 01/26, Andi Kleen wrote: > > But when I did that i couldn't come up with a good scenario > where multiple debuggers actually make sense. In a sense > being a debugger is really a very "intimate" thing for process. Do you > really want to have multiple of them messing with each other? > > If yes how would they know what to touch and what not? Yes, multiple debuggers can confuse each other if they change the state of debuggee simultaneously. The user should do this ;) > Can you think of any scenario where multiple debuggers > on a process make sense? Simple example. Try to debug/strace strace ot gdb itself. Not trivial, you can't attach to strace's tracees. Recently I spent 2 days trying to understand why strace -f hangs. I was able to attach to strace, but I wasn't able to see what its tracees do. And, it was not possible to even trace strace until it hangs, with ptrace the tracee (strace) must stop to report the event and this shadowed the race. Oleg.