winedbg: Respect Thumb mode when adjusting PC on ARM.

This commit is contained in:
André Hentschel 2012-03-10 18:26:05 +01:00 committed by Alexandre Julliard
parent c6008a06ac
commit 2c5a7743be
1 changed files with 6 additions and 4 deletions

View File

@ -205,13 +205,15 @@ static void be_arm_clear_watchpoint(CONTEXT* ctx, unsigned idx)
static int be_arm_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
{
INT step = (ctx->Cpsr & 0x20) ? 2 : 4;
if (way)
{
ctx->Pc-=4;
return -4;
ctx->Pc -= step;
return -step;
}
ctx->Pc+=4;
return 4;
ctx->Pc += step;
return step;
}
static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,