diff options
Diffstat (limited to 'src/unwinder')
-rw-r--r-- | src/unwinder/arm/unwinder_arm.cpp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/src/unwinder/arm/unwinder_arm.cpp b/src/unwinder/arm/unwinder_arm.cpp index f257e1cfb2..8e65ea3b5c 100644 --- a/src/unwinder/arm/unwinder_arm.cpp +++ b/src/unwinder/arm/unwinder_arm.cpp @@ -20,27 +20,31 @@ #define STATUS_UNWIND_UNSUPPORTED_VERSION STATUS_UNSUCCESSFUL -#define UPDATE_CONTEXT_POINTERS(Params, RegisterNumber, Address) \ -do { \ - PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers = (Params)->ContextPointers; \ - if (ARGUMENT_PRESENT(ContextPointers)) { \ - if (RegisterNumber >= 4 && RegisterNumber <= 11) { \ - (&ContextPointers->R4)[RegisterNumber - 4] = (PULONG)Address; \ - } else if (RegisterNumber == 14) { \ - ContextPointers->Lr = (PULONG)Address; \ - } \ - } \ +#define UPDATE_CONTEXT_POINTERS(Params, RegisterNumber, Address) \ +do { \ + if (ARGUMENT_PRESENT(Params)) { \ + PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers = (Params)->ContextPointers; \ + if (ARGUMENT_PRESENT(ContextPointers)) { \ + if (RegisterNumber >= 4 && RegisterNumber <= 11) { \ + (&ContextPointers->R4)[RegisterNumber - 4] = (PULONG)Address; \ + } else if (RegisterNumber == 14) { \ + ContextPointers->Lr = (PULONG)Address; \ + } \ + } \ + } \ } while (0) -#define UPDATE_FP_CONTEXT_POINTERS(Params, RegisterNumber, Address) \ -do { \ - PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers = (Params)->ContextPointers; \ - if (ARGUMENT_PRESENT(ContextPointers) && \ - (RegisterNumber >= 8) && \ - (RegisterNumber <= 15)) { \ - \ - (&ContextPointers->D8)[RegisterNumber - 8] = (PULONGLONG)Address; \ - } \ +#define UPDATE_FP_CONTEXT_POINTERS(Params, RegisterNumber, Address) \ +do { \ + if (ARGUMENT_PRESENT(Params)) { \ + PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers = (Params)->ContextPointers; \ + if (ARGUMENT_PRESENT(ContextPointers) && \ + (RegisterNumber >= 8) && \ + (RegisterNumber <= 15)) { \ + \ + (&ContextPointers->D8)[RegisterNumber - 8] = (PULONGLONG)Address; \ + } \ + } \ } while (0) #define VALIDATE_STACK_ADDRESS(Params, Context, DataSize, Alignment, OutStatus) |