From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25681 invoked by alias); 28 Sep 2009 17:45:29 -0000 Received: (qmail 25664 invoked by uid 22791); 28 Sep 2009 17:45:28 -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 mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.17.165) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Sep 2009 17:45:22 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id n8SHjKE1022165 for ; Mon, 28 Sep 2009 17:45:20 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 n8SHjK4G3121398 for ; Mon, 28 Sep 2009 19:45:20 +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 n8SHjJvU030655 for ; Mon, 28 Sep 2009 19:45:20 +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 n8SHjIkG030649; Mon, 28 Sep 2009 19:45:18 +0200 Message-Id: <200909281745.n8SHjIkG030649@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 28 Sep 2009 19:45:18 +0200 Subject: Re: [rfc] Fix PowerPC displaced stepping regression To: pedro@codesourcery.com (Pedro Alves) Date: Mon, 28 Sep 2009 17:45:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, julian@codesourcery.com (Julian Brown), drow@false.org (Daniel Jacobowitz) In-Reply-To: <200909281839.24088.pedro@codesourcery.com> from "Pedro Alves" at Sep 28, 2009 06:39:23 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/msg00874.txt.bz2 Pedro Alves wrote: > On Monday 28 September 2009 18:27:03, Ulrich Weigand wrote: > > Maybe I misunderstood your point here, but I don't think we can > > actually do SW single-step on the displaced copy (using the normal > > SW single-step mechanism). The way SW single-step ususally works > > is to place breakpoints at all potential branch targets. But if > > we have a displaced PC-relative branch, for example, the branch > > target may not even point to addressable memory, so we cannot put > > breakpoints there. > > If you get yourself such an instruction in the buffer, usually you'd > want the branch offset had to be adjusted at displaced copy time, > otherwise it seems to be you're already broken. If that's possible. In general, the real branch target may be out of range relative to the address of the copied instruction for a branch in the original instruction format ... (You could redirect to some temporary target in the copy buffer, but at this point you're probably better off just emulating the whole thing in the first place.) > But I did post a > confusing snippet, sorry. All I meant was to have displaced_step_copy > routine to tell infrun.c to call target_resume(continue), instead > of target_resume(step). Your version works for that too. Ah, I see. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com