From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2606 invoked by alias); 28 Oct 2008 03:21:04 -0000 Received: (qmail 2596 invoked by uid 22791); 28 Oct 2008 03:21:03 -0000 X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.191) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Oct 2008 03:20:28 +0000 Received: by ti-out-0910.google.com with SMTP id d10so1322052tib.12 for ; Mon, 27 Oct 2008 20:20:25 -0700 (PDT) Received: by 10.110.20.15 with SMTP id 15mr4070626tit.28.1225164025394; Mon, 27 Oct 2008 20:20:25 -0700 (PDT) Received: by 10.110.42.9 with HTTP; Mon, 27 Oct 2008 20:20:25 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2008 05:59:00 -0000 From: teawater To: "Pedro Alves" Subject: Re: Target can step over breakpoints itself Cc: gdb-patches@sourceware.org In-Reply-To: <200810271419.00304.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200810271419.00304.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00672.txt.bz2 This patch is cool! I make a simulator can step over breakpoint with itself in before. I think a lot of simulator can do it too. Cause they can control breakpoint with itself. On Mon, Oct 27, 2008 at 22:19, Pedro Alves wrote: > When adding non-stop debugging support to a target/arch, one of the > most important aspects we need to take care of, is to have a means > to step over breakpoints without removing them from the inferior, > otherwise, other running threads may miss them. We've added a mechanism > to GDB that does out-of-line single-stepping (displaced stepping), which > we use on linux x86 and ppc. The smarts to do this are all on the GDB side. > > DICOS debug API can take care of magically stepping over software > breakpoints transparently, which means that we don't have to resort to > do displaced stepping on the GDB side. > > The attached patch adds a new "StepOverBreakpoints" feature to the > remote protocol to the remote stub can tell GDB that the debug api has > that feature, and exposes that knowledge to the rest of GDB by > adding a new target_ops method (target_can_step_over_breakpoints), > and teaching infrun.c to it doesn't need to do the traditional hold-and-step > dance (remove breakpoints, single-step, insert breakpoints) from the > inferior(s), if the target reports support for stepping over them > itself. > > Any objections/thoughts on this? > > -- > Pedro Alves >