From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4456 invoked by alias); 16 Oct 2008 18:27:02 -0000 Received: (qmail 4446 invoked by uid 22791); 16 Oct 2008 18:27:01 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout1.012.net.il (HELO mtaout1.012.net.il) (84.95.2.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 16 Oct 2008 18:26:22 +0000 Received: from HOME-C4E4A596F7 ([77.127.24.3]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K8U00KEAGKDN310@i-mtaout1.012.net.il> for gdb-patches@sourceware.org; Thu, 16 Oct 2008 20:26:39 +0200 (IST) Date: Thu, 16 Oct 2008 18:27:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] Displaced stepping just enable in non-stop mode In-reply-to: <20081016123422.GA31057@caradoc.them.org> X-012-Sender: halo1@inter.net.il To: Daniel Jacobowitz Cc: pedro@codesourcery.com, teawater@gmail.com, gdb-patches@sourceware.org, brobecker@adacore.com, msnyder@vmware.com Reply-to: Eli Zaretskii Message-id: References: <200810160107.42525.pedro@codesourcery.com> <20081016123422.GA31057@caradoc.them.org> 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/msg00413.txt.bz2 > Date: Thu, 16 Oct 2008 08:34:22 -0400 > From: Daniel Jacobowitz > Cc: Pedro Alves , teawater@gmail.com, > gdb-patches@sourceware.org, brobecker@adacore.com, > msnyder@vmware.com > > On Thu, Oct 16, 2008 at 10:12:37AM +0200, Eli Zaretskii wrote: > > . Why isn't it better to use displaced stepping, if supported, even > > if non-stop mode is not in effect? I think the linkage between > > the two is confusing and unnecessary. > > It is generally good to use displaced stepping. But in some > circumstances it is slower, and in others it doesn't work at all. It > requires we have a small scratchpad area on the target which is > writeable and executable. By default we use the area at _start; this > doesn't work on some simulator targets, on targets which execute code > from ROM or flash memory, or during reverse debugging. > > Some of those cases could be fixed by adding a user knob for where to > put the scratchpad, though others can't. > > It's linked to non-stop because for non-stop it is required. Sorry, I don't get the logic of this decision. Can we reliably use displaced stepping, or can't we? If we can do that reliably in vast majority of use-cases, we should do that even without non-stop. If we cannot do that reliably enough, we shouldn't turn it on even with non-stop mode, or maybe refuse to turn on non-stop, rather than risk screwing the users. Since we are prepared to decide that turning non-stop turns on displaced stepping, I understand that in most cases displaced stepping does work, which brings me to the conclusion that we could use displaced stepping even without non-stop. We could also try to detect if it works, and display a warning if we think it won't (RE the cases you described above). > I'm not sure what else to call displaced stepping. "Step around > breakpoints"? The text mentions "out-of-line stepping", which sounds better to me.