From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20860 invoked by alias); 28 Sep 2009 17:39:12 -0000 Received: (qmail 20751 invoked by uid 22791); 28 Sep 2009 17:39:11 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.17.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Sep 2009 17:39:05 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.1/8.13.1) with ESMTP id n8SHd34P006990 for ; Mon, 28 Sep 2009 17:39:03 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n8SHd2Hs2945148 for ; Mon, 28 Sep 2009 19:39:02 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n8SHd2IF025769 for ; Mon, 28 Sep 2009 19:39:02 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n8SHd1RJ025762; Mon, 28 Sep 2009 19:39:01 +0200 Message-Id: <200909281739.n8SHd1RJ025762@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 28 Sep 2009 19:39:01 +0200 Subject: Re: [rfc] Fix PowerPC displaced stepping regression To: pedro@codesourcery.com (Pedro Alves) Date: Mon, 28 Sep 2009 17:39:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, julian@codesourcery.com (Julian Brown), drow@false.org (Daniel Jacobowitz) In-Reply-To: <200909281831.45115.pedro@codesourcery.com> from "Pedro Alves" at Sep 28, 2009 06:31:44 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2009-09/txt/msg00872.txt.bz2 Pedro Alves wrote: > At the points where we decide to use displaced stepping because > software single-stepping doesn't work with multiple pending > simultaneous requests. So, adding a non_stop check there in > front of software_single_step_p, > > if (use_displaced_stepping (gdbarch) > && (tp->trap_expected > - || (step && gdbarch_software_single_step_p (gdbarch))) > + || (non_stop && step && gdbarch_software_single_step_p (gdbarch))) > > > ... and in maybe_software_singlestep: > > - if (use_displaced_stepping (gdbarch)) > - if (non_stop) > hw_step = 0; > > (or make resume clear `step' if "non_stop && step && gdbarch_software_single_step_p (gdbarch))" > so to we'd not reach maybe_software_singlestep at all. Ah, now I've got it, thanks! > But, let's ignore this. The only benefit would be for > all-stop + displaced stepping=on to not trigger displaced > stepping all the way. Agreed. > > > Did you consider making the gdbarch_displaced_step_copy_insn > > > callback itself return that it expects the target to be > > > continued instead of stepped? > > > > Yes, but this would have required changes to the existing gdbarch > > interface that would have meant updating all existing users; and > > I wanted to produce a patch that doesn't touch any platform I > > cannot test at this point ... > > > > In any case, the two interfaces should be pretty much identical: > > a target can simply set a flag in its "closure" and return this > > flag from the displaced_step_hw_singlestep routine. That's why > > I'm passing the closure in, even though PPC doesn't need it ... > > True. I like that! OK, good :-) Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com