Skip to content

Commit 5472103

Browse files
committed
Arm64 support !UNWIND_CONTEXT_IS_UCONTEXT_T
1 parent d6cf906 commit 5472103

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/coreclr/src/pal/src/exception/seh-unwind.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,22 @@ static void WinContextToUnwindContext(CONTEXT *winContext, unw_context_t *unwCon
111111
unwContext->regs[13] = winContext->Sp;
112112
unwContext->regs[14] = winContext->Lr;
113113
unwContext->regs[15] = winContext->Pc;
114+
#elif defined(HOST_ARM64)
115+
unwContext->uc_mcontext.pc = winContext->Pc;
116+
unwContext->uc_mcontext.sp = winContext->Sp;
117+
unwContext->uc_mcontext.regs[29] = winContext->Fp;
118+
unwContext->uc_mcontext.regs[30] = winContext->Lr;
119+
120+
unwContext->uc_mcontext.regs[19] = winContext->X19;
121+
unwContext->uc_mcontext.regs[20] = winContext->X20;
122+
unwContext->uc_mcontext.regs[21] = winContext->X21;
123+
unwContext->uc_mcontext.regs[22] = winContext->X22;
124+
unwContext->uc_mcontext.regs[23] = winContext->X23;
125+
unwContext->uc_mcontext.regs[24] = winContext->X24;
126+
unwContext->uc_mcontext.regs[25] = winContext->X25;
127+
unwContext->uc_mcontext.regs[26] = winContext->X26;
128+
unwContext->uc_mcontext.regs[27] = winContext->X27;
129+
unwContext->uc_mcontext.regs[28] = winContext->X28;
114130
#endif
115131
}
116132

0 commit comments

Comments
 (0)