From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24829 invoked by alias); 4 Mar 2010 13:40:20 -0000 Received: (qmail 24820 invoked by uid 22791); 4 Mar 2010 13:40:19 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 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, 04 Mar 2010 13:40:15 +0000 Received: (qmail 1538 invoked from network); 4 Mar 2010 13:40:14 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Mar 2010 13:40:14 -0000 Date: Thu, 04 Mar 2010 13:40:00 -0000 From: Daniel Jacobowitz To: Matthew Gretton-Dann Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [ARM] Improve heuristic to guess the instruction state for the next PC when single-stepping Message-ID: <20100304133944.GA21490@caradoc.them.org> Mail-Followup-To: Matthew Gretton-Dann , gdb-patches@sourceware.org References: <1267703327.13980.13.camel@e102111-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1267703327.13980.13.camel@e102111-lin.cambridge.arm.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-03/txt/msg00170.txt.bz2 On Thu, Mar 04, 2010 at 11:48:47AM +0000, Matthew Gretton-Dann wrote: > This patch attempts to fix this by seeing if arm_pc_is_thumb () is being > asked about the address we will end up at if we execute the instruction > at the current PC. If so it 'executes' the current instruction to see > if it will change state, and uses this information to determine the > return value. This is a cute approach. I can't think of any potential problems with it, so I'll commit your patch. > 2010-03-04 Matthew Gretton-Dann > > * arm-tdep.c (arm_pc_is_thumb): Add heuristic that tries to get > the state right when single stepping. > (arm_get_next_pc_raw, thumb_get_next_pc_raw): New functions. > Get the next PC along with the instruction state. > (thumb_get_next_pc): Remove. > (arm_get_next_pc): Modified to use arm_get_next_pc_raw (). At some point we were asked to not use " ()" to indicate functions, so I've removed that bit. -- Daniel Jacobowitz CodeSourcery