summaryrefslogtreecommitdiff
path: root/platform/windows/crash_handler_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/crash_handler_windows.cpp')
-rw-r--r--platform/windows/crash_handler_windows.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/windows/crash_handler_windows.cpp b/platform/windows/crash_handler_windows.cpp
index 6ce10e6f0f..b501ee78db 100644
--- a/platform/windows/crash_handler_windows.cpp
+++ b/platform/windows/crash_handler_windows.cpp
@@ -173,10 +173,18 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
frame.AddrStack.Mode = AddrModeFlat;
frame.AddrFrame.Mode = AddrModeFlat;
-#ifdef _M_X64
+#if defined(_M_X64)
frame.AddrPC.Offset = context->Rip;
frame.AddrStack.Offset = context->Rsp;
frame.AddrFrame.Offset = context->Rbp;
+#elif defined(_M_ARM64) || defined(_M_ARM64EC)
+ frame.AddrPC.Offset = context->Pc;
+ frame.AddrStack.Offset = context->Sp;
+ frame.AddrFrame.Offset = context->Fp;
+#elif defined(_M_ARM)
+ frame.AddrPC.Offset = context->Pc;
+ frame.AddrStack.Offset = context->Sp;
+ frame.AddrFrame.Offset = context->R11;
#else
frame.AddrPC.Offset = context->Eip;
frame.AddrStack.Offset = context->Esp;