summaryrefslogtreecommitdiff
path: root/src/debug/di
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2018-11-23 19:14:03 +0100
committerGitHub <noreply@github.com>2018-11-23 19:14:03 +0100
commitb5c9edd9ea63639328ec587003f97922b80ef029 (patch)
tree555063df52a77c744bdadbe87ee97f9f0a8f3a4c /src/debug/di
parentc385d44dcdc62118a4556f002516db1b5bdcdf37 (diff)
downloadcoreclr-b5c9edd9ea63639328ec587003f97922b80ef029.tar.gz
coreclr-b5c9edd9ea63639328ec587003f97922b80ef029.tar.bz2
coreclr-b5c9edd9ea63639328ec587003f97922b80ef029.zip
Fix debugger collectible thread statics access (#21175)
The CordbClass::GetStaticFieldValue2 was missing support for accessing thread statics in collectible classes. Fortunately the fix was simple, we can use the same code path as for non-collectible thread statics.
Diffstat (limited to 'src/debug/di')
-rw-r--r--src/debug/di/rsclass.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/debug/di/rsclass.cpp b/src/debug/di/rsclass.cpp
index 987f001f80..bfd02c75ec 100644
--- a/src/debug/di/rsclass.cpp
+++ b/src/debug/di/rsclass.cpp
@@ -240,25 +240,28 @@ HRESULT CordbClass::GetStaticFieldValue2(CordbModule * pModule,
CORDB_ADDRESS pRmtStaticValue = NULL;
CordbProcess * pProcess = pModule->GetProcess();
- if (pFieldData->m_fFldIsCollectibleStatic)
+ if (!pFieldData->m_fFldIsTLS)
{
- EX_TRY
+ if (pFieldData->m_fFldIsCollectibleStatic)
{
- pRmtStaticValue = pProcess->GetDAC()->GetCollectibleTypeStaticAddress(pFieldData->m_vmFieldDesc,
- pModule->GetAppDomain()->GetADToken());
+ EX_TRY
+ {
+ pRmtStaticValue = pProcess->GetDAC()->GetCollectibleTypeStaticAddress(pFieldData->m_vmFieldDesc,
+ pModule->GetAppDomain()->GetADToken());
+ }
+ EX_CATCH_HRESULT(hr);
+ if(FAILED(hr))
+ {
+ return hr;
+ }
}
- EX_CATCH_HRESULT(hr);
- if(FAILED(hr))
+ else
{
- return hr;
+ // Statics never move, so we always address them using their absolute address.
+ _ASSERTE(pFieldData->OkToGetOrSetStaticAddress());
+ pRmtStaticValue = pFieldData->GetStaticAddress();
}
}
- else if (!pFieldData->m_fFldIsTLS)
- {
- // Statics never move, so we always address them using their absolute address.
- _ASSERTE(pFieldData->OkToGetOrSetStaticAddress());
- pRmtStaticValue = pFieldData->GetStaticAddress();
- }
else
{
// We've got a thread local static