@@ -989,6 +989,9 @@ void StackFrameIterator::CommonCtor(Thread * pThread, PTR_Frame pFrame, ULONG32
989989 m_movedPastFirstExInfo = false ;
990990 m_fFuncletNotSeen = false ;
991991 m_fFoundFirstFunclet = false ;
992+ #ifdef FEATURE_INTERPRETER
993+ m_walkingInterpreterFrames = false ;
994+ #endif
992995#if defined(RECORD_RESUMABLE_FRAME_SP)
993996 m_pvResumableFrameTargetSP = NULL ;
994997#endif
@@ -2896,6 +2899,33 @@ void StackFrameIterator::ProcessCurrentFrame(void)
28962899 sizeof (m_crawl.codeManState .stateBuf ));
28972900#endif // _DEBUG
28982901
2902+ #ifdef FEATURE_INTERPRETER
2903+ if (!m_crawl.isFrameless )
2904+ {
2905+ if (m_crawl.pFrame ->GetFrameIdentifier () == FrameIdentifier::InterpreterFrame)
2906+ {
2907+ if (!m_walkingInterpreterFrames)
2908+ {
2909+ // We have hit the InterpreterFrame while we were not processing the interpreter frames.
2910+ // Switch to walking the underlying interpreted frames.
2911+ PTR_InterpMethodContextFrame pTOSInterpMethodContextFrame = ((PTR_InterpreterFrame)m_crawl.pFrame )->GetInterpMethodTopmostContextFrame ();
2912+ PREGDISPLAY pRD = m_crawl.GetRegisterSet ();
2913+ SetIP (pRD->pCurrentContext , (TADDR)pTOSInterpMethodContextFrame->ip );
2914+ SetSP (pRD->pCurrentContext , dac_cast<TADDR>(pTOSInterpMethodContextFrame));
2915+ pRD->pCurrentContext ->ContextFlags = CONTEXT_CONTROL;
2916+ SyncRegDisplayToCurrentContext (pRD);
2917+ ProcessIp (GetControlPC (pRD));
2918+ m_walkingInterpreterFrames = m_crawl.isFrameless ;
2919+ }
2920+ else
2921+ {
2922+ // We have finished walking the interpreted frames. Process the InterpreterFrame itself.
2923+ m_walkingInterpreterFrames = false ;
2924+ }
2925+ }
2926+ }
2927+ #endif // FEATURE_INTERPRETER
2928+
28992929 if (m_crawl.isFrameless )
29002930 {
29012931 // ------------------------------------------------------------------------
0 commit comments