// Save the state of the source exception tracker
void ExceptionTracker::PartialTrackerState::Save(const ExceptionTracker* pSourceTracker)
{
- m_sfResumeStackFrame = pSourceTracker->m_sfResumeStackFrame;
- m_ScannedStackRange = pSourceTracker->m_ScannedStackRange;
m_uCatchToCallPC = pSourceTracker->m_uCatchToCallPC;
m_pClauseForCatchToken = pSourceTracker->m_pClauseForCatchToken;
m_ClauseForCatch = pSourceTracker->m_ClauseForCatch;
// Restore the state into the target exception tracker
void ExceptionTracker::PartialTrackerState::Restore(ExceptionTracker* pTargetTracker)
{
- pTargetTracker->m_sfResumeStackFrame = m_sfResumeStackFrame;
- pTargetTracker->m_ScannedStackRange = m_ScannedStackRange;
pTargetTracker->m_uCatchToCallPC = m_uCatchToCallPC;
pTargetTracker->m_pClauseForCatchToken = m_pClauseForCatchToken;
pTargetTracker->m_ClauseForCatch = m_ClauseForCatch;
previousTrackerPartialState.Restore(pNewTracker);
// Reset the 'unwind has started' flag to indicate we are in the first pass again
pNewTracker->m_ExceptionFlags.ResetUnwindHasStarted();
- // Remember the current scanned stack range so that we can restore it after
- // switching to the 2nd pass.
- pNewTracker->m_secondPassInitialScannedStackRange = pNewTracker->m_ScannedStackRange;
}
CONSISTENCY_CHECK(pNewTracker->IsValid());
// We have to detect this transition because otherwise we break when unmanaged code
// catches our exceptions.
EH_LOG((LL_INFO100, ">>tracker transitioned to second pass\n"));
- pTracker->m_ScannedStackRange = pTracker->m_secondPassInitialScannedStackRange;
+ pTracker->m_ScannedStackRange.Reset();
pTracker->m_ExceptionFlags.SetUnwindHasStarted();
if (pTracker->m_ExceptionFlags.UnwindingToFindResumeFrame())
// is propagated to the new tracker instance.
class PartialTrackerState
{
- StackFrame m_sfResumeStackFrame;
- StackRange m_ScannedStackRange;
UINT_PTR m_uCatchToCallPC;
PTR_EXCEPTION_CLAUSE_TOKEN m_pClauseForCatchToken;
EE_ILEXCEPTION_CLAUSE m_ClauseForCatch;
// reuse its memory, if it's non-NULL, it better be a valid thread pointer
StackRange m_ScannedStackRange;
- // Range used to initialize the m_ScannedStackRange at start of the 2nd pass.
- // This is:
- // 1) null range for non-interleaved exception handling and the very first
- // 2nd pass of the interleaved handling and
- // 2) non-null for the other 2nd passes of the interleaved handling.
- StackRange m_secondPassInitialScannedStackRange;
DAC_EXCEPTION_POINTERS m_ptrs;
OBJECTHANDLE m_hThrowable;
StackTraceInfo m_StackTraceInfo;