summaryrefslogtreecommitdiff
path: root/src/vm/stackwalk.cpp
diff options
context:
space:
mode:
authorGeoff Norton <grompf@gmail.com>2015-02-17 12:50:09 -0800
committerGeoff Norton <grompf@gmail.com>2015-02-17 12:50:09 -0800
commit93e6d80704cfe274a38a2c4cd26e14cb823f7236 (patch)
tree146dd9413ba740d7c47b46f847e7322ec671b67a /src/vm/stackwalk.cpp
parent551c97656c6a5a08c22ff614e81423170ab08ee5 (diff)
parent2ae979db2206f49fef92e83af3571f6901dc5bff (diff)
downloadcoreclr-93e6d80704cfe274a38a2c4cd26e14cb823f7236.tar.gz
coreclr-93e6d80704cfe274a38a2c4cd26e14cb823f7236.tar.bz2
coreclr-93e6d80704cfe274a38a2c4cd26e14cb823f7236.zip
Merge branch 'master' into unix_issue177
Conflicts: src/pal/src/config.h.linux src/pal/src/config.h.osx src/pal/src/exception/seh-unwind.cpp
Diffstat (limited to 'src/vm/stackwalk.cpp')
-rw-r--r--src/vm/stackwalk.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp
index fe3b99a98f..8ad5cdd9b8 100644
--- a/src/vm/stackwalk.cpp
+++ b/src/vm/stackwalk.cpp
@@ -1133,9 +1133,9 @@ void StackFrameIterator::CommonCtor(Thread * pThread, PTR_Frame pFrame, ULONG32
m_fDidFuncletReportGCReferences = true;
#endif // WIN64EXCEPTIONS
-#if defined(_WIN64) || defined(_TARGET_ARM_)
+#if !defined(_TARGET_X86_)
m_pvResumableFrameTargetSP = NULL;
-#endif // defined(_WIN64) || defined(_TARGET_ARM_)
+#endif
} // StackFrameIterator::CommonCtor()
//---------------------------------------------------------------------------------------
@@ -1180,10 +1180,10 @@ BOOL StackFrameIterator::Init(Thread * pThread,
_ASSERTE(CanThisThreadCallIntoHost() || (flags & LIGHTUNWIND) == 0);
#endif // DACCESS_COMPILE
-#if defined(_WIN64) || defined(_TARGET_ARM_)
+#if !defined(_TARGET_X86_)
_ASSERTE(!(flags & POPFRAMES));
_ASSERTE(pRegDisp->pCurrentContext);
-#endif // _WIN64 || _TARGET_ARM_
+#endif // !_TARGET_X86_
BEGIN_FORBID_TYPELOAD();
@@ -1339,7 +1339,7 @@ BOOL StackFrameIterator::ResetRegDisp(PREGDISPLAY pRegDisp,
{
TADDR curSP = GetRegdisplaySP(m_crawl.pRD);
-#if defined(_WIN64) || defined(_TARGET_ARM_)
+#if !defined(_TARGET_X86_)
if (m_crawl.IsFrameless())
{
// On 64-bit and ARM, we stop at the explicit frames contained in a managed stack frame
@@ -1347,7 +1347,7 @@ BOOL StackFrameIterator::ResetRegDisp(PREGDISPLAY pRegDisp,
EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, NULL);
curSP = GetSP(m_crawl.pRD->pCallerContext);
}
-#endif // defined(_WIN64) || defined(_TARGET_ARM_)
+#endif // !_TARGET_X86_
#if defined(_TARGET_X86_)
// special processing on x86; see below for more information
@@ -1670,15 +1670,15 @@ ProcessFuncletsForGCReporting:
// When enumerating GC references for "liveness" reporting, depending upon the architecture,
// the reponsibility of who reports what varies:
//
- // 1) On x86, Evanesco (ARM) and X64 (via RyuJIT) the funclet reports all references belonging to itself and its parent method.
+ // 1) On x86, ARM and X64 (via RyuJIT) the funclet reports all references belonging to itself and its parent method.
//
// 2) X64 (via JIT64) has the reporting distributed between the funclets and the parent method.
// If some reference(s) get double reported, JIT64 can handle that by playing conservative.
//
- // 3) On Evanesco, the reporting is done by funclets (if present). Otherwise, the primary method
+ // 3) On ARM, the reporting is done by funclets (if present). Otherwise, the primary method
// does it.
//
- // On x64 and Evanesco, the GCStackCrawlCallback is invoked with a new flag indicating that
+ // On x64 and ARM, the GCStackCrawlCallback is invoked with a new flag indicating that
// the stackwalk is being done for GC reporting purposes - this flag is GC_FUNCLET_REFERENCE_REPORTING.
// The presence of this flag influences how stackwalker will enumerate frames, which frames will
// result in the callback being invoked, etc. The idea is that we want to report only the
@@ -1686,7 +1686,7 @@ ProcessFuncletsForGCReporting:
// double report (even though JIT64 does it today), reporting of dead frames, and makes the
// design of reference reporting more consistent (and easier to understand) across architectures.
//
- // NOTE: This flag is applicable only to X64 and Evanesco (ARM).
+ // NOTE: This flag is applicable only to X64 and ARM.
//
// The algorithm is as follows (at a conceptual level):
//
@@ -1705,7 +1705,7 @@ ProcessFuncletsForGCReporting:
// 2) If another frame enumerated, goto (1). Otherwise, stackwalk is complete.
//
// Note: When a flag is passed to the callback indicating that the funclet for a parent frame has already
- // reported the references, RyuJIT (Evanesco) will simply do nothing and return from the callback.
+ // reported the references, RyuJIT (ARM) will simply do nothing and return from the callback.
// JIT64, on the other hand, will ignore the flag and perform reporting (again), like it does today.
//
// Note: For non-filter funcelts there is a small window during unwind where we have conceptually unwound past a
@@ -2214,7 +2214,7 @@ StackWalkAction StackFrameIterator::NextRaw(void)
if (m_frameState == SFITER_SKIPPED_FRAME_FUNCTION)
{
-#if (defined(_WIN64) || defined(_TARGET_ARM_)) && defined(_DEBUG)
+#if !defined(_TARGET_X86_) && defined(_DEBUG)
// make sure we're not skipping a different transition
if (m_crawl.pFrame->NeedsUpdateRegDisplay())
{
@@ -2232,7 +2232,7 @@ StackWalkAction StackFrameIterator::NextRaw(void)
CONSISTENCY_CHECK(GetControlPC(m_crawl.pRD) == m_crawl.pFrame->GetReturnAddress());
}
}
-#endif // (defined(_WIN64) || defined(_TARGET_ARM_)) && defined(_DEBUG)
+#endif // !defined(_TARGET_X86_) && defined(_DEBUG)
#if defined(STACKWALKER_MAY_POP_FRAMES)
if (m_flags & POPFRAMES)
@@ -2287,8 +2287,8 @@ StackWalkAction StackFrameIterator::NextRaw(void)
{
goto Cleanup;
}
-#elif (defined(_WIN64) || defined(_TARGET_ARM_))
- // On WIN64 and ARM, we are done handling the skipped explicit frame at this point. So move on to the
+#else // _TARGET_X86_
+ // We are done handling the skipped explicit frame at this point. So move on to the
// managed stack frame.
m_crawl.isFrameless = true;
m_crawl.codeInfo = m_cachedCodeInfo;
@@ -2297,16 +2297,16 @@ StackWalkAction StackFrameIterator::NextRaw(void)
PreProcessingForManagedFrames();
goto Cleanup;
-#endif // (defined(_WIN64) || defined(_TARGET_ARM_))
+#endif // _TARGET_X86_
}
}
else if (m_frameState == SFITER_FRAMELESS_METHOD)
{
// Now find out if we need to leave monitors
-#if !defined(_WIN64) && !defined(_TARGET_ARM_)
+#ifdef _TARGET_X86_
//
- // WIN64 and ARM has the JIT generate try/finallys to leave monitors
+ // For non-x86 platforms, the JIT generates try/finally to leave monitors; for x86, the VM handles the monitor
//
#if defined(STACKWALKER_MAY_POP_FRAMES)
if (m_flags & POPFRAMES)
@@ -2351,7 +2351,7 @@ StackWalkAction StackFrameIterator::NextRaw(void)
END_GCX_ASSERT_COOP;
}
#endif // STACKWALKER_MAY_POP_FRAMES
-#endif // !defined(_WIN64) && !defined(_TARGET_ARM_)
+#endif // _TARGET_X86_
#if !defined(ELIMINATE_FEF)
// FaultingExceptionFrame is special case where it gets
@@ -2539,7 +2539,7 @@ StackWalkAction StackFrameIterator::NextRaw(void)
{
m_crawl.pFrame->UpdateRegDisplay(m_crawl.pRD);
-#if defined(_WIN64) || defined(_TARGET_ARM_)
+#if !defined(_TARGET_X86_)
CONSISTENCY_CHECK(NULL == m_pvResumableFrameTargetSP);
if (m_crawl.isFirst)
@@ -2567,7 +2567,7 @@ StackWalkAction StackFrameIterator::NextRaw(void)
EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, m_crawl.GetStackwalkCacheEntry());
m_pvResumableFrameTargetSP = (LPVOID)GetSP(m_crawl.pRD->pCallerContext);
}
-#endif // defined(_WIN64) || defined(_TARGET_ARM_)
+#endif // !_TARGET_X86_
// We are transitioning from unmanaged code to managed code... lets do some validation of our
@@ -2867,15 +2867,15 @@ void StackFrameIterator::ProcessCurrentFrame(void)
// Cache values which may be updated by CheckForSkippedFrames()
m_cachedCodeInfo = m_crawl.codeInfo;
-#if defined(_WIN64) || defined(_TARGET_ARM_)
- // On WIN64 and ARM, we want to process the skipped explicit frames before the managed stack frame
+#if !defined(_TARGET_X86_)
+ // On non-X86, we want to process the skipped explicit frames before the managed stack frame
// containing them.
if (CheckForSkippedFrames())
{
_ASSERTE(m_frameState == SFITER_SKIPPED_FRAME_FUNCTION);
}
else
-#endif // _WIN64 || _TARGET_ARM_
+#endif // !_TARGET_X86_
{
PreProcessingForManagedFrames();
_ASSERTE(m_frameState == SFITER_FRAMELESS_METHOD);
@@ -2922,9 +2922,9 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void)
// Can the caller handle skipped frames;
fHandleSkippedFrames = (m_flags & HANDLESKIPPEDFRAMES);
-#if !(defined(_WIN64) || defined(_TARGET_ARM_))
+#if defined(_TARGET_X86_)
pvReferenceSP = GetRegdisplaySP(m_crawl.pRD);
-#else // (defined(_WIN64) || defined(_TARGET_ARM_))
+#else // _TARGET_X86_
// Order the Frames relative to the caller SP of the methods
// this makes it so that any Frame that is in a managed call
// frame will be reported before its containing method.
@@ -2932,7 +2932,7 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void)
// This should always succeed! If it doesn't, it's a bug somewhere else!
EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, m_crawl.GetStackwalkCacheEntry(), &m_cachedCodeInfo);
pvReferenceSP = GetSP(m_crawl.pRD->pCallerContext);
-#endif // !(defined(_WIN64) || defined(_TARGET_ARM_))
+#endif // _TARGET_X86_
if ( !( (m_crawl.pFrame != FRAME_TOP) &&
(dac_cast<TADDR>(m_crawl.pFrame) < pvReferenceSP) )
@@ -3018,7 +3018,7 @@ void StackFrameIterator::PreProcessingForManagedFrames(void)
WRAPPER_NO_CONTRACT;
SUPPORTS_DAC;
-#if defined(_WIN64) || defined(_TARGET_ARM_)
+#if !defined(_TARGET_X86_)
if (m_pvResumableFrameTargetSP)
{
// We expect that if we saw a resumable frame, the next managed
@@ -3032,7 +3032,7 @@ void StackFrameIterator::PreProcessingForManagedFrames(void)
m_pvResumableFrameTargetSP = NULL;
m_crawl.isFirst = true;
}
-#endif // defined(_WIN64) || defined(_TARGET_ARM_)
+#endif // !_TARGET_X86_
#if !defined(DACCESS_COMPILE)
m_pCachedGSCookie = (GSCookie*)m_crawl.GetCodeManager()->GetGSCookieAddr(