From: Nicolas Pitre Date: Mon, 19 Oct 2009 19:49:46 +0000 (-0400) Subject: fix single step of bx instruction going into Thumb mode X-Git-Tag: v0.3.0-rc0~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6726b78707f349d389c30ce85713047eb761b7ca;p=openocd fix single step of bx instruction going into Thumb mode Without this fix, the following code cannot be single stepped: add ip, pc, #1 bx ip [thumb code here] --- diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 93fb3dd9..e2f49c39 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -358,7 +358,7 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si if (dry_run_pc) { - *dry_run_pc = target; + *dry_run_pc = target & ~1; return ERROR_OK; } else