From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24484 invoked by alias); 3 Oct 2008 20:57:55 -0000 Received: (qmail 24474 invoked by uid 22791); 3 Oct 2008 20:57:54 -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; Fri, 03 Oct 2008 20:57:19 +0000 Received: (qmail 15712 invoked from network); 3 Oct 2008 20:57:17 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Oct 2008 20:57:17 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Some ideas of displaced step function Date: Fri, 03 Oct 2008 20:57:00 -0000 User-Agent: KMail/1.9.9 Cc: Michael Snyder , teawater References: <200810031453.16952.pedro@codesourcery.com> <48E6644F.80604@vmware.com> In-Reply-To: <48E6644F.80604@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810032157.35989.pedro@codesourcery.com> 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: 2008-10/txt/msg00025.txt.bz2 On Friday 03 October 2008 19:28:31, Michael Snyder wrote: > Pedro Alves wrote: > > On Friday 03 October 2008 01:31:54, Michael Snyder wrote: > > > >> Why are we using displaced-stepping when we're not async? > > > > s/async/non-stop mode/g. All-stop + async doesn't need > > it either. This feature was added for non-stop, as a way to > > avoid lifting breakpoints from the inferior when stepping over > > a breakpoint, otherwise, other running threads could miss them. > > > > No other reason to have it always on other than for more > > exposure, I guess. Time to pull the plug? > > > > I'd still like to have a way to enable displaced-stepping > > in all-stop mode, as it's very useful for testing. > > I certainly don't mind 'enable', but maybe it doesn't > need to always be enabled by default? > There, you lost me. :-) Perhaps we're saying the same thing. What I meant was that sneaking a `&& non_stop' here: static int use_displaced_stepping (struct gdbarch *gdbarch) { return (can_use_displaced_stepping + && non_stop && gdbarch_displaced_step_copy_insn_p (gdbarch)); } ... would make us use displaced stepping only in non-stop mode, so the problems we've been hearing about are sidestepped. This puts the onus of making displaced stepping work on targets/systems/modes that need it. But, then one can't use displaced stepping in all-stop mode, without hacking the code, that is. It feels like if we make this change, we should either give new meaning to the current `maint set can-use-displaced-stepping' command, replace it with some other command, or plainly add a new command in addition to the current. -- Pedro Alves