This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [ARM] Improve heuristic to guess the instruction state for the next PC when single-stepping
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 4 Mar 2010 08:39:47 -0500
- Subject: Re: [PATCH] [ARM] Improve heuristic to guess the instruction state for the next PC when single-stepping
- References: <1267703327.13980.13.camel@e102111-lin.cambridge.arm.com>
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 <matthew.gretton-dann@arm.com>
>
> * 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