summaryrefslogtreecommitdiff
path: root/src/debug/ee/funceval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/ee/funceval.cpp')
-rw-r--r--src/debug/ee/funceval.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/debug/ee/funceval.cpp b/src/debug/ee/funceval.cpp
index d195fafb8b..d2e5576855 100644
--- a/src/debug/ee/funceval.cpp
+++ b/src/debug/ee/funceval.cpp
@@ -3962,6 +3962,12 @@ FuncEvalHijackPersonalityRoutine(IN PEXCEPTION_RECORD pExceptionRecord
// in FuncEvalHijack we allocate 8 bytes of stack space and then store R0 at the current SP, so if we subtract 8 from
// the establisher frame we can get the stack location where R0 was stored.
pDE = *(DebuggerEval**)(pDispatcherContext->EstablisherFrame - 8);
+
+#elif defined(_TARGET_ARM64_)
+ // on ARM64 the establisher frame is the SP of the caller of FuncEvalHijack.
+ // in FuncEvalHijack we allocate 32 bytes of stack space and then store R0 at the current SP + 16, so if we subtract 16 from
+ // the establisher frame we can get the stack location where R0 was stored.
+ pDE = *(DebuggerEval**)(pDispatcherContext->EstablisherFrame - 16);
#else
_ASSERTE(!"NYI - FuncEvalHijackPersonalityRoutine()");
#endif