summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas Pitre <nico@fluxnic.net>2009-10-19 15:49:46 -0400
committerØyvind Harboe <oyvind.harboe@zylin.com>2009-10-19 22:04:07 +0200
commit6726b78707f349d389c30ce85713047eb761b7ca (patch)
treebb293509541a69a5fdfb4ad424adbd8b5f8c3779 /src
parent97166327db9373952908633d991fec82c677253a (diff)
downloadopenocd+libswd-6726b78707f349d389c30ce85713047eb761b7ca.tar.gz
openocd+libswd-6726b78707f349d389c30ce85713047eb761b7ca.tar.bz2
openocd+libswd-6726b78707f349d389c30ce85713047eb761b7ca.tar.xz
openocd+libswd-6726b78707f349d389c30ce85713047eb761b7ca.zip
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]
Diffstat (limited to 'src')
-rw-r--r--src/target/arm_simulator.c2
1 files changed, 1 insertions, 1 deletions
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