From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25398 invoked by alias); 17 Dec 2007 03:31:06 -0000 Received: (qmail 25383 invoked by uid 22791); 17 Dec 2007 03:31:05 -0000 X-Spam-Check-By: sourceware.org Received: from igw3.br.ibm.com (HELO igw3.br.ibm.com) (32.104.18.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Dec 2007 03:30:56 +0000 Received: from mailhub3.br.ibm.com (unknown [9.18.232.110]) by igw3.br.ibm.com (Postfix) with ESMTP id 4E0B139000C for ; Mon, 17 Dec 2007 01:24:18 -0200 (BRDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id lBH3UrLN4419648 for ; Mon, 17 Dec 2007 01:30:53 -0200 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lBH3Uq9B028023 for ; Mon, 17 Dec 2007 01:30:52 -0200 Received: from [9.8.15.0] ([9.8.15.0]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id lBH3Uq06028013; Mon, 17 Dec 2007 01:30:52 -0200 Subject: Re: Stepping off breakpoints in non-stop debugging mode From: Thiago Jung Bauermann To: Jim Blandy Cc: gdb@sourceware.org In-Reply-To: References: Content-Type: text/plain Date: Mon, 17 Dec 2007 03:31:00 -0000 Message-Id: <1197861489.6746.323.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00114.txt.bz2 On Sat, 2007-12-08 at 01:23 -0800, Jim Blandy wrote: > For CodeSourcery's contract with Ericsson, I've implemented the > kprobes strategy for stepping off breakpoints in GDB for the i386; the > full patch is at the bottom of this message. It introduces no > regressions on i386, using displaced stepping for stepping off all > breakpoints. Combined with Vlad's work to leave breakpoints inserted > at all times, this gives us breakpoint behavior suitable for non-stop > debugging. > > As far as the public GDB project is concerned, what do folks think > about the kprobes approach? Apologies if if you've already thought these through... Did you give any thoughts to the x86_64 instructions? I don't actually know much about them, but in this e-mail http://sourceware.org/ml/systemtap/2007-q1/msg00571.html Roland McGrath mentions some complexities involved in pc-relative addressing there, which don't exist in the i386 case. Also, he is concerned that instruction parsing would need to be carefully done. So, is it possible that this technique cannot be done for some instructions? If so, a mechanism for emulating them or falling back to all-stop mode for that specific breakpoint could be used (this is the approach taken by Frysk, AFAIK). I looked at the Power ISA document and it is similar to the i386 in that only flow control insns are of concern. I'll try to confirm this with someone more experienced than me, however. > If anybody makes it this far, thank you very much. Two or three times, even. It's not easy for this stuff to sink in. :-) -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center