Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753776Ab0AZPBS (ORCPT ); Tue, 26 Jan 2010 10:01:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752414Ab0AZPBR (ORCPT ); Tue, 26 Jan 2010 10:01:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60661 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751717Ab0AZPBQ (ORCPT ); Tue, 26 Jan 2010 10:01:16 -0500 Date: Tue, 26 Jan 2010 10:00:15 -0500 From: "Frank Ch. Eigler" To: Tom Tromey Cc: Linus Torvalds , Kyle Moffett , Oleg Nesterov , Andrew Morton , Stephen Rothwell , Peter Zijlstra , Peter Zijlstra , Fr??d??ric Weisbecker , LKML , Steven Rostedt , Arnaldo Carvalho de Melo , linux-next@vger.kernel.org, "H. Peter Anvin" , utrace-devel@redhat.com, Thomas Gleixner Subject: Re: linux-next: add utrace tree Message-ID: <20100126150015.GA24292@redhat.com> References: <20100122182827.GA13185@redhat.com> <20100122200129.GG22003@redhat.com> <20100122221348.GA4263@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1743 Lines: 56 Hi - On Mon, Jan 25, 2010 at 02:05:54PM -0700, Tom Tromey wrote: > [...] > Nevertheless, if the Linux kernel were to present a new user-space API, > and if it had an advantage over ptrace, then we would port GDB to use > it. There are other platforms where, IIRC, we now use some /proc thing > instead of ptrace. > > There are definitely things we would like from such an API. Here's a > few I can think of immediately, there are probably others. > > * Use an fd, not SIGCHLD+wait, to report inferior state changes to gdb. > [...] Relatedly, don't mess with the inferior's parentage. This is satisfied by the gdbstub prototype. > * Support "displaced stepping" in the kernel [...] I believe this is tantamount to hardware breakpoint support, which is already present (via optional uprobes). > * Support some kind of breakpoint expression in the kernel; this would > improve performance of conditional breakpoints. Perhaps the existing > gdb agent expressions could be used. This is in the todo list. And that "KILLER FEATURE" of running strace plus gdb on the same process? It *already works* with the gdbstub, and unmodified strace + gdb, thanks to utrace multiplexing process control. It is still artificially restricted in many ways, but this sort of thing is ready for testing: % process & [1] 9999 % strace -o FILE -p 9999 & % gdb process (gdb) target remote /proc/9999/gdb (gdb) backtrace (gdb) cont (gdb) ^D % [process continues] % cat FILE [...] % kill 9999 - FChE -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/