From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3687 invoked by alias); 10 Feb 2011 06:42:42 -0000 Received: (qmail 3678 invoked by uid 22791); 10 Feb 2011 06:42:41 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Feb 2011 06:42:36 +0000 Received: (qmail 10413 invoked from network); 10 Feb 2011 06:42:34 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Feb 2011 06:42:34 -0000 Message-ID: <4D5388D6.2050901@codesourcery.com> Date: Thu, 10 Feb 2011 06:42:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ulrich Weigand CC: gdb-patches@sourceware.org Subject: Re: [try 3rd] arm_pc_is_thumb takes displaced stepping into account References: <201101311538.p0VFcwIn019533@d06av02.portsmouth.uk.ibm.com> In-Reply-To: <201101311538.p0VFcwIn019533@d06av02.portsmouth.uk.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 2011-02/txt/msg00193.txt.bz2 On 01/31/2011 11:38 PM, Ulrich Weigand wrote: > What if the copy area contains more than a single instruction, and we > need to find out the mode of the PC corresponding to the second of them? > This approach can handle multiple instructions in copy area, because during preparation of displaced stepping (in displaced_step_prepare), regcache_write_pc is called to update PC to the *address of copy area*, no matter how many instructions in copy area. Per my limited knowledge on GDB, I can't find a case that PC is set somewhere of copy area other than the beginning of copy area during displaced stepping. That is to say, we don't have to know the mode of the 2nd instruction. Actually, most of the time, copy area contains more than one instructions, and test suite works well. This can also prove that this approach works. -- Yao (齐尧)