diff options
Diffstat (limited to 'src/Native/Runtime/unix/UnixNativeCodeManager.cpp')
-rw-r--r-- | src/Native/Runtime/unix/UnixNativeCodeManager.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Native/Runtime/unix/UnixNativeCodeManager.cpp b/src/Native/Runtime/unix/UnixNativeCodeManager.cpp index 4138cc8b5..927755238 100644 --- a/src/Native/Runtime/unix/UnixNativeCodeManager.cpp +++ b/src/Native/Runtime/unix/UnixNativeCodeManager.cpp @@ -144,12 +144,20 @@ bool UnixNativeCodeManager::UnwindStackFrame(MethodInfo * pMethodInfo, p += sizeof(int32_t); GcInfoDecoder decoder(GCInfoToken(p), DECODE_REVERSE_PINVOKE_VAR); + INT32 slot = decoder.GetReversePInvokeFrameStackSlot(); + assert(slot != NO_REVERSE_PINVOKE_FRAME); - // @TODO: CORERT: Encode reverse PInvoke frame slot in GCInfo: https://github.com/dotnet/corert/issues/2115 - // INT32 slot = decoder.GetReversePInvokeFrameStackSlot(); - // assert(slot != NO_REVERSE_PINVOKE_FRAME); - - *ppPreviousTransitionFrame = (PTR_VOID)-1; + TADDR basePointer = NULL; + UINT32 stackBasedRegister = decoder.GetStackBaseRegister(); + if (stackBasedRegister == NO_STACK_BASE_REGISTER) + { + basePointer = dac_cast<TADDR>(pRegisterSet->GetSP()); + } + else + { + basePointer = dac_cast<TADDR>(pRegisterSet->GetFP()); + } + *ppPreviousTransitionFrame = *(void**)(basePointer + slot); return true; } |