summaryrefslogtreecommitdiff
path: root/src/ToolBox
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-10-11 13:04:43 -0700
committerGitHub <noreply@github.com>2017-10-11 13:04:43 -0700
commit27a25bd37fa1fe6201c27709b1884e1b328f8beb (patch)
tree18b7773a7d8e18cca609417940804d8dff491da2 /src/ToolBox
parentd07f1b24c4a69e6a205f8510f3dcfae0ad96aae8 (diff)
downloadcoreclr-27a25bd37fa1fe6201c27709b1884e1b328f8beb.tar.gz
coreclr-27a25bd37fa1fe6201c27709b1884e1b328f8beb.tar.bz2
coreclr-27a25bd37fa1fe6201c27709b1884e1b328f8beb.zip
Delete !FEATURE_IMPLICIT_TLS (#14398)
Linux and Windows arm64 are using the regular C/C++ thread local statics. This change unifies the remaining Windows architectures to be on the same plan.
Diffstat (limited to 'src/ToolBox')
-rw-r--r--src/ToolBox/SOS/Strike/strike.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index 338e70dc9a..def0af31e4 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -5778,7 +5778,6 @@ HRESULT PrintSpecialThreads()
TADDR CLRTLSDataAddr = 0;
-#ifdef FEATURE_IMPLICIT_TLS
TADDR tlsArrayAddr = NULL;
if (!SafeReadMemory (TO_TADDR(cdaTeb) + WINNT_OFFSETOF__TEB__ThreadLocalStoragePointer , &tlsArrayAddr, sizeof (void**), NULL))
{
@@ -5788,36 +5787,13 @@ HRESULT PrintSpecialThreads()
TADDR moduleTlsDataAddr = 0;
- if (!SafeReadMemory (tlsArrayAddr + sizeof (void*) * dwCLRTLSDataIndex, &moduleTlsDataAddr, sizeof (void**), NULL))
+ if (!SafeReadMemory (tlsArrayAddr + sizeof (void*) * (dwCLRTLSDataIndex & 0xFFFF), &moduleTlsDataAddr, sizeof (void**), NULL))
{
PrintLn("Failed to get Tls expansion slots for thread ", ThreadID(SysId));
continue;
}
- CLRTLSDataAddr = moduleTlsDataAddr + OFFSETOF__TLS__tls_EETlsData;
-#else
- if (dwCLRTLSDataIndex < TLS_MINIMUM_AVAILABLE)
- {
- CLRTLSDataAddr = TO_TADDR(cdaTeb) + offsetof(TEB, TlsSlots) + sizeof (void*) * dwCLRTLSDataIndex;
- }
- else
- {
- //if TLS index is bigger than TLS_MINIMUM_AVAILABLE, the TLS slot lives in ExpansionSlots
- TADDR TebExpsionAddr = NULL;
- if (!SafeReadMemory (TO_TADDR(cdaTeb) + offsetof(TEB, TlsExpansionSlots) , &TebExpsionAddr, sizeof (void**), NULL))
- {
- PrintLn("Failed to get Tls expansion slots for thread ", ThreadID(SysId));
- continue;
- }
-
- if (TebExpsionAddr == NULL)
- {
- continue;
- }
-
- CLRTLSDataAddr = TebExpsionAddr + sizeof (void*) * (dwCLRTLSDataIndex - TLS_MINIMUM_AVAILABLE);
- }
-#endif // FEATURE_IMPLICIT_TLS
+ CLRTLSDataAddr = moduleTlsDataAddr + ((dwCLRTLSDataIndex & 0x7FFF0000) >> 16) + OFFSETOF__TLS__tls_EETlsData;
TADDR CLRTLSData = NULL;
if (!SafeReadMemory (CLRTLSDataAddr, &CLRTLSData, sizeof (TADDR), NULL))