From 6726b78707f349d389c30ce85713047eb761b7ca Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Mon, 19 Oct 2009 15:49:46 -0400 Subject: [PATCH] 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] --- src/target/arm_simulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 93fb3dd9b..e2f49c390 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