Module: wine Branch: master Commit: bdcc47d9e75f57fef016bacd4b0b5d563e424fb2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bdcc47d9e75f57fef016bacd4b...
Author: André Hentschel nerv@dawncrow.de Date: Fri Apr 15 19:34:32 2011 +0200
dbghelp: Implement arm_fetch_context_reg.
---
dlls/dbghelp/cpu_arm.c | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/dlls/dbghelp/cpu_arm.c b/dlls/dbghelp/cpu_arm.c index f201a1d..365caa3 100644 --- a/dlls/dbghelp/cpu_arm.c +++ b/dlls/dbghelp/cpu_arm.c @@ -63,7 +63,30 @@ static unsigned arm_map_dwarf_register(unsigned regno)
static void* arm_fetch_context_reg(CONTEXT* ctx, unsigned regno, unsigned* size) { - FIXME("not done for ARM\n"); +#ifdef __arm__ + switch (regno) + { + case CV_ARM_R0 + 0: *size = sizeof(ctx->R0); return &ctx->R0; + case CV_ARM_R0 + 1: *size = sizeof(ctx->R1); return &ctx->R1; + case CV_ARM_R0 + 2: *size = sizeof(ctx->R2); return &ctx->R2; + case CV_ARM_R0 + 3: *size = sizeof(ctx->R3); return &ctx->R3; + case CV_ARM_R0 + 4: *size = sizeof(ctx->R4); return &ctx->R4; + case CV_ARM_R0 + 5: *size = sizeof(ctx->R5); return &ctx->R5; + case CV_ARM_R0 + 6: *size = sizeof(ctx->R6); return &ctx->R6; + case CV_ARM_R0 + 7: *size = sizeof(ctx->R7); return &ctx->R7; + case CV_ARM_R0 + 8: *size = sizeof(ctx->R8); return &ctx->R8; + case CV_ARM_R0 + 9: *size = sizeof(ctx->R9); return &ctx->R9; + case CV_ARM_R0 + 10: *size = sizeof(ctx->R10); return &ctx->R10; + case CV_ARM_R0 + 11: *size = sizeof(ctx->Fp); return &ctx->Fp; + case CV_ARM_R0 + 12: *size = sizeof(ctx->Ip); return &ctx->Ip; + + case CV_ARM_SP: *size = sizeof(ctx->Sp); return &ctx->Sp; + case CV_ARM_LR: *size = sizeof(ctx->Lr); return &ctx->Lr; + case CV_ARM_PC: *size = sizeof(ctx->Pc); return &ctx->Pc; + case CV_ARM_CPSR: *size = sizeof(ctx->Cpsr); return &ctx->Cpsr; + } +#endif + FIXME("Unknown register %x\n", regno); return NULL; }