summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2018-02-26 15:19:00 -0800
committerGitHub <noreply@github.com>2018-02-26 15:19:00 -0800
commit759f0c84fcffa058e5d2ed9ba8a13e47fd28ee5c (patch)
treeb5b29228718c1145154fd7b60e8f674b522e7f80 /src/inc
parent3cb7c002e1325a7614961fd10e9a9f989528370f (diff)
downloadcoreclr-759f0c84fcffa058e5d2ed9ba8a13e47fd28ee5c.tar.gz
coreclr-759f0c84fcffa058e5d2ed9ba8a13e47fd28ee5c.tar.bz2
coreclr-759f0c84fcffa058e5d2ed9ba8a13e47fd28ee5c.zip
Fixed mixed mode attach/JIT debugging. (#16552)
Fixed mixed mode attach/JIT debugging. The mixed mode debugging attach uses TLS slot to communicate between debugger break-in thread and the right side. Unfortunately, the __thread static variables cannot be used on debugger breakin thread because of it does not have storage allocated for them. The fix is to switch the storage for debugger word to classic TlsAlloc allocated slot that works fine on debugger break-in thread. There was also problem (that is also in 2.0) where the WINNT_OFFSETOF__TEB__ThreadLocalStoragePointer was using the define for 64/32 bit and ended up always the 32 bit Windows value. This caused the right side GetEEThreadValue, GetEETlsDataBlock unmanaged thread functions to always fail.
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/dacvars.h4
-rw-r--r--src/inc/tls.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/inc/dacvars.h b/src/inc/dacvars.h
index 8cc3f0249e..a4209f12ac 100644
--- a/src/inc/dacvars.h
+++ b/src/inc/dacvars.h
@@ -126,7 +126,9 @@ DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceProfiling, SystemDomain::s_fFor
DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceInstrument, SystemDomain::s_fForceInstrument)
DEFINE_DACVAR(ULONG, PTR_SharedDomain, SharedDomain__m_pSharedDomain, SharedDomain::m_pSharedDomain)
-
+#ifdef FEATURE_INTEROP_DEBUGGING
+DEFINE_DACVAR(ULONG, DWORD, dac__g_debuggerWordTLSIndex, g_debuggerWordTLSIndex)
+#endif
DEFINE_DACVAR(ULONG, DWORD, dac__g_TlsIndex, g_TlsIndex)
#if defined(FEATURE_WINDOWSPHONE)
diff --git a/src/inc/tls.h b/src/inc/tls.h
index 3e8c9a770d..429e41c151 100644
--- a/src/inc/tls.h
+++ b/src/inc/tls.h
@@ -16,7 +16,7 @@
#define OFFSETOF__TLS__tls_CurrentThread (0x0)
#define OFFSETOF__TLS__tls_EETlsData (2*sizeof(void*))
-#ifdef _TARGET_WIN64_
+#ifdef DBG_TARGET_WIN64
#define WINNT_OFFSETOF__TEB__ThreadLocalStoragePointer 0x58
#else
#define WINNT_OFFSETOF__TEB__ThreadLocalStoragePointer 0x2c