Skip to content

Commit

Permalink
Fix ARM compilation for windows. (KjellKod#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
englercj authored Apr 8, 2021
1 parent 61f3f6e commit d3f2d11
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/stacktrace_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,17 @@ namespace {
frame.AddrPC.Mode = AddrModeFlat;
frame.AddrFrame.Mode = AddrModeFlat;
frame.AddrStack.Mode = AddrModeFlat;
#ifdef _M_X64
#if defined(_M_ARM64)
frame.AddrPC.Offset = context->Pc;
frame.AddrFrame.Offset = context->Fp;
frame.AddrStack.Offset = context->Sp;
machine_type = IMAGE_FILE_MACHINE_ARM64;
#elif defined(_M_ARM)
frame.AddrPC.Offset = context->Pc;
frame.AddrFrame.Offset = context->R11;
frame.AddrStack.Offset = context->Sp;
machine_type = IMAGE_FILE_MACHINE_ARM;
#elif defined(_M_X64)
frame.AddrPC.Offset = context->Rip;
frame.AddrFrame.Offset = context->Rbp;
frame.AddrStack.Offset = context->Rsp;
Expand Down

0 comments on commit d3f2d11

Please sign in to comment.