summaryrefslogtreecommitdiff
path: root/src/debug/di
diff options
context:
space:
mode:
authorAndrew Au <andrewau@microsoft.com>2018-07-10 17:20:42 -0700
committerAndrew Au <cshung@gmail.com>2018-11-06 18:34:47 -0800
commita89cd9e6654d21fc0f2a03eeaff71bcc84f69a1f (patch)
treeab6ad0846ad2ce13aa5f40697894ea0f25fa2077 /src/debug/di
parenteba995ab407dea951c933e8804b4982215575c1b (diff)
downloadcoreclr-a89cd9e6654d21fc0f2a03eeaff71bcc84f69a1f.tar.gz
coreclr-a89cd9e6654d21fc0f2a03eeaff71bcc84f69a1f.tar.bz2
coreclr-a89cd9e6654d21fc0f2a03eeaff71bcc84f69a1f.zip
Do not handle the thread context for garbage collection events
Diffstat (limited to 'src/debug/di')
-rw-r--r--src/debug/di/process.cpp31
-rw-r--r--src/debug/di/rspriv.h3
2 files changed, 6 insertions, 28 deletions
diff --git a/src/debug/di/process.cpp b/src/debug/di/process.cpp
index 8fcd994536..e668fe6a93 100644
--- a/src/debug/di/process.cpp
+++ b/src/debug/di/process.cpp
@@ -984,8 +984,7 @@ CordbProcess::CordbProcess(ULONG64 clrInstanceId,
m_pEventChannel(NULL),
m_fAssertOnTargetInconsistency(false),
m_runtimeOffsetsInitialized(false),
- m_writableMetadataUpdateMode(LegacyCompatPolicy),
- m_isBlockedOnGarbageCollectionEvent(false)
+ m_writableMetadataUpdateMode(LegacyCompatPolicy)
{
_ASSERTE((m_id == 0) == (pShim == NULL));
@@ -3645,8 +3644,6 @@ HRESULT CordbProcess::Continue(BOOL fIsOutOfBand)
{
PUBLIC_API_ENTRY(this);
- this->m_isBlockedOnGarbageCollectionEvent = false;
-
if (m_pShim == NULL) // This API is moved off to the shim
{
// bias towards failing with CORDBG_E_NUETERED.
@@ -4914,7 +4911,6 @@ void CordbProcess::RawDispatchEvent(
case DB_IPCE_BEFORE_GARBAGE_COLLECTION:
{
{
- this->m_isBlockedOnGarbageCollectionEvent = true;
PUBLIC_CALLBACK_IN_THIS_SCOPE(this, pLockHolder, pEvent);
pCallback4->BeforeGarbageCollection(static_cast<ICorDebugProcess*>(this));
}
@@ -4924,7 +4920,6 @@ void CordbProcess::RawDispatchEvent(
case DB_IPCE_AFTER_GARBAGE_COLLECTION:
{
{
- this->m_isBlockedOnGarbageCollectionEvent = true;
PUBLIC_CALLBACK_IN_THIS_SCOPE(this, pLockHolder, pEvent);
pCallback4->AfterGarbageCollection(static_cast<ICorDebugProcess*>(this));
}
@@ -6509,17 +6504,10 @@ HRESULT CordbProcess::GetThreadContext(DWORD threadID, ULONG32 contextSize, BYTE
hr = E_INVALIDARG;
}
else
- {
- if (this->m_isBlockedOnGarbageCollectionEvent)
- {
- hr = this->GetDataTarget()->GetThreadContext(threadID, CONTEXT_FULL, contextSize, context);
- }
- else
- {
- DT_CONTEXT* managedContext;
- hr = thread->GetManagedContext(&managedContext);
- *pContext = *managedContext;
- }
+ {
+ DT_CONTEXT* managedContext;
+ hr = thread->GetManagedContext(&managedContext);
+ *pContext = *managedContext;
}
}
EX_CATCH
@@ -6611,14 +6599,7 @@ HRESULT CordbProcess::SetThreadContext(DWORD threadID, ULONG32 contextSize, BYTE
hr = E_INVALIDARG;
}
- if (this->m_isBlockedOnGarbageCollectionEvent)
- {
- hr = this->m_pMutableDataTarget->SetThreadContext(threadID, contextSize, context);
- }
- else
- {
- hr = thread->SetManagedContext(pContext);
- }
+ hr = thread->SetManagedContext(pContext);
}
EX_CATCH
{
diff --git a/src/debug/di/rspriv.h b/src/debug/di/rspriv.h
index d3de6650fb..86df87aaae 100644
--- a/src/debug/di/rspriv.h
+++ b/src/debug/di/rspriv.h
@@ -4113,9 +4113,6 @@ private:
// controls how metadata updated in the target is handled
WriteableMetadataUpdateMode m_writableMetadataUpdateMode;
-
- // TODO: Comments
- bool m_isBlockedOnGarbageCollectionEvent;
};
// Some IMDArocess APIs are supported as interop-only.