From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4462 invoked by alias); 17 Dec 2007 19:41:45 -0000 Received: (qmail 4453 invoked by uid 22791); 17 Dec 2007 19:41:44 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Dec 2007 19:41:38 +0000 Received: (qmail 31140 invoked from network); 17 Dec 2007 19:41:36 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Dec 2007 19:41:36 -0000 To: Thiago Jung Bauermann Cc: gdb@sourceware.org Subject: Re: Stepping off breakpoints in non-stop debugging mode References: <1197861489.6746.323.camel@localhost.localdomain> From: Jim Blandy Date: Mon, 17 Dec 2007 19:41:00 -0000 In-Reply-To: <1197861489.6746.323.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Mon, 17 Dec 2007 01:18:09 -0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00123.txt.bz2 Thiago Jung Bauermann writes: > 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. This is a great find --- thanks very much. I was aware of the PC-relative addressing on the x86_64, but figured we'd cross that bridge when we came to it. From what Roland has written, it seems that will be quite involved. The interface I posted does allow the 'copy_insn' gdbarch method to simply say, "I've taken care of emulating this instruction for you". I don't know yet if that's practical in all the cases we care about.