From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18409 invoked by alias); 14 Feb 2011 14:16:35 -0000 Received: (qmail 18397 invoked by uid 22791); 14 Feb 2011 14:16:33 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate4.uk.ibm.com (HELO mtagate4.uk.ibm.com) (194.196.100.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 14:16:29 +0000 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate4.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p1EEGRJe009350 for ; Mon, 14 Feb 2011 14:16:27 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1EEGW7I1785910 for ; Mon, 14 Feb 2011 14:16:32 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1EEGQvf014811 for ; Mon, 14 Feb 2011 07:16:26 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p1EEGPxC014774; Mon, 14 Feb 2011 07:16:25 -0700 Message-Id: <201102141416.p1EEGPxC014774@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 14 Feb 2011 15:16:25 +0100 Subject: Re: [patch] Fix PR tdep/12352: Handle str pc, [Rd, #imm] in displaced stepping To: yao@codesourcery.com (Yao Qi) Date: Mon, 14 Feb 2011 14:39:00 -0000 From: "Ulrich Weigand" Cc: Richard.Earnshaw@buzzard.freeserve.co.uk (Richard Earnshaw), gdb-patches@sourceware.org, julian@codesourcery.com In-Reply-To: <4D538352.8090303@codesourcery.com> from "Yao Qi" at Feb 10, 2011 02:18:58 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: 2011-02/txt/msg00277.txt.bz2 Yao Qi wrote: > A new patch is attached in which PUSH/POP is used. I also noticed that > Insn4 should be 'add r4, r4, #16' rather than 'add r4, r4, #8', > explained in the comments. After that, the offset of my board is 8. I think this is wrong: the "pipeline offset" of 8 bytes is already added to the PC value when it is retrieved by displaced_read_reg (this applies to any use of PC as source operand in any instruction). The special case relating to STR PC is about an optional *additional* offset of 4 bytes (such that PC + 12 instead of PC + 8 is stored); the "offset" value computed by this routine should therefore be 0 or 4 (not 8 or 12). > Run patched arm-disp-step.exp on native GDB configured as > armv7l-unknown-linux-gnueabi. No failures. Maybe it would be good to add a test that verifies the value stored under displaced stepping is identical to the value stored when running the instruction natively? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com