Module: wine
Branch: master
Commit: 6c11d1d745af859cab682c3330bcf391f2521121
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6c11d1d745af859cab682c33…
Author: Martin Storsjo <martin(a)martin.st>
Date: Thu May 28 11:14:44 2020 +0300
ntdll: Implement RtlRestoreContext.
Call the consolidate frame callback before resuming. Before
calling the callback, fill in ExceptionInformation[10] with the
equivalent of dispatch.NonVolatileRegisters.
This fixes unwinding of MSVC C++ exceptions in a lot of cases.
Signed-off-by: Martin Storsjo <martin(a)martin.st>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
.../api-ms-win-core-rtlsupport-l1-1-0.spec | 2 +-
.../api-ms-win-core-rtlsupport-l1-2-0.spec | 2 +-
dlls/ntdll/ntdll.spec | 2 +-
dlls/ntdll/signal_arm64.c | 134 ++++++++++++++++++++-
4 files changed, 136 insertions(+), 4 deletions(-)
Diff: https://source.winehq.org/git/wine.git/?a=commitdiff;h=6c11d1d745af859cab68…
Module: wine
Branch: master
Commit: 42a5885669e35f13725ab8e36d3a95132bd49ffc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=42a5885669e35f13725ab8e3…
Author: Martin Storsjo <martin(a)martin.st>
Date: Thu May 28 11:14:41 2020 +0300
ntdll: Store the real stack pointer in RtlCaptureContext.
In most cases, unwinding will use the frame pointer anyway, so it
doesn't make much of a difference, but for cases where it won't,
capture the actual stack pointer.
(In most cases on arm64, calling the RtlCaptureContext won't cause
anything extra to be pushed on the stack at that point anyway).
Signed-off-by: Martin Storsjo <martin(a)martin.st>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/ntdll/signal_arm64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index b364f08e9a..4c9017b9e2 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -265,8 +265,8 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8,
"stp x23, x24, [x0, #0xc0]\n\t" /* context->X23,X24 */
"stp x25, x26, [x0, #0xd0]\n\t" /* context->X25,X26 */
"stp x27, x28, [x0, #0xe0]\n\t" /* context->X27,X28 */
- "stp x29, x30, [x0, #0xf0]\n\t" /* context->Fp,Lr */
- "add x1, x29, #0x10\n\t"
+ "stp x29, x30, [x0, #0xf0]\n\t" /* context->Fp,Lr */
+ "mov x1, sp\n\t"
"stp x1, x30, [x0, #0x100]\n\t" /* context->Sp,Pc */
"mov w1, #0x400000\n\t" /* CONTEXT_ARM64 */
"add w1, w1, #0x3\n\t" /* CONTEXT_FULL */