Module: wine Branch: master Commit: 93a3a6c03f4114ec05fbd26cb684d0859575f5b3 URL: https://gitlab.winehq.org/wine/wine/-/commit/93a3a6c03f4114ec05fbd26cb684d08...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Nov 30 11:23:29 2023 +0100
ntdll: Allow unwind rules to override the default stack pointer assignment.
---
dlls/ntdll/unix/dwarf.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/unix/dwarf.h b/dlls/ntdll/unix/dwarf.h index 8deb845ca13..51102cd4a7e 100644 --- a/dlls/ntdll/unix/dwarf.h +++ b/dlls/ntdll/unix/dwarf.h @@ -980,6 +980,12 @@ static void apply_frame_state( CONTEXT *context, struct frame_state *state, } if (!cfa) return;
+#ifdef __x86_64__ + new_context.Rsp = cfa; +#elif defined(__aarch64__) + new_context.Sp = cfa; +#endif + for (i = 0; i < NB_FRAME_REGS; i++) { switch (state->rules[i]) @@ -1004,11 +1010,6 @@ static void apply_frame_state( CONTEXT *context, struct frame_state *state, break; } } -#ifdef __x86_64__ - new_context.Rsp = cfa; -#elif defined(__aarch64__) - new_context.Sp = cfa; -#endif *context = new_context; }