aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/arm/wrapper.c')
-rw-r--r--sim/arm/wrapper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 5db178c..513c0d0 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -225,6 +225,10 @@ sim_create_inferior (sd, abfd, argv, env)
case 7: /* armv5 */
case 8: /* armv5t */
ARMul_SelectProcessor (state, STRONGARM);
+ /* Reset mode to ARM. A gdb user may rerun a program that had entered
+ THUMB mode from the start and cause the ARM-mode startup code to be
+ executed in THUMB mode. */
+ ARMul_SetCPSR (state, THUMB2MODE);
break;
case 3: /* armv3 */