Hi, this patch fixes a problem in the ARM simulator when executing a mode change. Please see attached emails for explanation. The bug fix skips increasing state->Reg[15] by 2 instructions during a mode change. This is the patch: --- gdb-5.3.orig/sim/arm/armemu.c 2002-07-05 16:12:01.000000000 +0200 +++ gdb-5.3/sim/arm/armemu.c 2003-04-25 16:17:19.000000000 +0200 @@ -3556,7 +3556,15 @@ check_PMUintr: state->Emulate = STOP; /* If we have changed mode, allow the PC to advance before stopping. */ else if (state->Emulate == CHANGEMODE) - continue; + { + pc = state->Reg[15]; +#ifndef MODE32 + pc = pc & R15PCBITS; +#endif + state->Reg[15] = pc; + state->NextInstr = RESUME; + break; + } else if (state->Emulate != RUN) break; } Regards, Peter Hornung ---------------------------------------------------------------------------- ------------- Peter Hornung, Siemens A&D PT1 D1, Siemensstraße 2, 90766 Fürth, Germany E-Mail: Peter_Hornung@siemens.com Tel: +49-911-978-2013, Fax: +49-911-978-2035