summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dac.cmake1
-rw-r--r--src/ToolBox/SOS/Strike/strike.cpp5
-rw-r--r--src/ToolBox/SOS/lldbplugin/debugclient.cpp2
-rw-r--r--src/debug/daccess/daccess.cpp19
-rw-r--r--src/debug/daccess/enummem.cpp5
-rw-r--r--src/debug/ee/CMakeLists.txt4
-rw-r--r--src/debug/ee/dactable.cpp89
-rw-r--r--src/dlls/mscoree/mscoree.cpp7
-rw-r--r--src/gc/gc.h1
-rw-r--r--src/gc/gceesvr.cpp13
-rw-r--r--src/gc/gcpriv.h1
-rw-r--r--src/gc/gcscan.h4
-rw-r--r--src/inc/corhost.h3
-rw-r--r--src/inc/daccess.h62
-rw-r--r--src/inc/dacvars.h324
-rw-r--r--src/inc/eetwain.h4
-rw-r--r--src/inc/sstring.h3
-rw-r--r--src/inc/vptr_list.h2
-rw-r--r--src/pal/inc/pal.h24
-rw-r--r--src/pal/src/CMakeLists.txt1
-rw-r--r--src/pal/src/misc/dactableaddress.cpp163
-rw-r--r--src/unwinder/dac/hostwinamd64/CMakeLists.txt4
-rw-r--r--src/vm/appdomain.hpp3
-rw-r--r--src/vm/ceemain.h2
-rw-r--r--src/vm/codeman.h6
-rw-r--r--src/vm/crst.h3
-rw-r--r--src/vm/dbginterface.h2
-rw-r--r--src/vm/eedbginterface.h2
-rw-r--r--src/vm/eedbginterfaceimpl.h4
-rw-r--r--src/vm/object.h1
-rw-r--r--src/vm/pefile.h1
-rw-r--r--src/vm/rcwwalker.h2
-rw-r--r--src/vm/security.h6
-rw-r--r--src/vm/securitydescriptor.h2
-rw-r--r--src/vm/securitydescriptorappdomain.h2
-rw-r--r--src/vm/securitydescriptorassembly.h2
-rw-r--r--src/vm/simplerwlock.hpp2
-rw-r--r--src/vm/stackwalktypes.h2
-rw-r--r--src/vm/stubmgr.h3
-rw-r--r--src/vm/win32threadpool.h17
40 files changed, 599 insertions, 204 deletions
diff --git a/dac.cmake b/dac.cmake
index 90608c68ed..1b27ac00dc 100644
--- a/dac.cmake
+++ b/dac.cmake
@@ -1,7 +1,6 @@
# Contains the dac build specific definitions. Included by the leaf dac cmake files.
remove_definitions(-DPROFILING_SUPPORTED)
-add_definitions(-DPROFILING_SUPPORTED_DATA)
add_definitions(-DDACCESS_COMPILE)
if(WIN32)
add_definitions(-MT)
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index c41e6568a9..641953493f 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -279,11 +279,6 @@ DECLARE_API(IP2MD)
{
return Status;
}
-#ifdef FEATURE_PAL
- // TODO - mikem 2/20/14 - temporary until the rest of the DAC is working.
- ExtOut("Test output for IP2MD %16x\n", IP);
- return Status;
-#endif
EnableDMLHolder dmlHolder(dml);
if (IP == 0)
diff --git a/src/ToolBox/SOS/lldbplugin/debugclient.cpp b/src/ToolBox/SOS/lldbplugin/debugclient.cpp
index 5f506fed08..e973670f1e 100644
--- a/src/ToolBox/SOS/lldbplugin/debugclient.cpp
+++ b/src/ToolBox/SOS/lldbplugin/debugclient.cpp
@@ -176,7 +176,7 @@ DebugClient::ReadVirtual(
ULONG bufferSize,
PULONG bytesRead)
{
- bytesRead = 0;
+ *bytesRead = 0;
lldb::SBTarget target = m_debugger.GetSelectedTarget();
if (!target.IsValid())
diff --git a/src/debug/daccess/daccess.cpp b/src/debug/daccess/daccess.cpp
index 7e10e2a445..24f18bdb48 100644
--- a/src/debug/daccess/daccess.cpp
+++ b/src/debug/daccess/daccess.cpp
@@ -7180,6 +7180,25 @@ HRESULT
ClrDataAccess::GetDacGlobals()
{
#ifdef FEATURE_PAL
+ // TODO - 3/5/15 - the DAC side needs the debuggee pid
+ DWORD pid = 0;
+ PVOID dacTableAddress = nullptr;
+ ULONG dacTableSize = 0;
+ DWORD err = PAL_GetDacTableAddress(pid, &dacTableAddress, &dacTableSize);
+ if (err != ERROR_SUCCESS)
+ {
+ return CORDBG_E_MISSING_DEBUGGER_EXPORTS;
+ }
+
+ if (dacTableSize != sizeof(g_dacGlobals))
+ {
+ return E_INVALIDARG;
+ }
+
+ if (FAILED(ReadFromDataTarget(m_pTarget, (ULONG64)dacTableAddress, (BYTE*)&g_dacGlobals, dacTableSize)))
+ {
+ return CORDBG_E_MISSING_DEBUGGER_EXPORTS;
+ }
return S_OK;
#else
HRESULT status = E_FAIL;
diff --git a/src/debug/daccess/enummem.cpp b/src/debug/daccess/enummem.cpp
index ce7786e989..0d50ec6767 100644
--- a/src/debug/daccess/enummem.cpp
+++ b/src/debug/daccess/enummem.cpp
@@ -216,7 +216,10 @@ HRESULT ClrDataAccess::EnumMemCLRStatic(IN CLRDataEnumMemoryFlags flags)
// global variables. But it won't report the structures that are pointed by
// global pointers.
//
-#define DEFINE_DACVAR(id_type, size_type, id) \
+#define DEFINE_DACVAR(id_type, size_type, id, var) \
+ ReportMem(m_globalBase + g_dacGlobals.id, sizeof(size_type));
+
+#define DEFINE_DACVAR_SVR(id_type, size_type, id, var) \
ReportMem(m_globalBase + g_dacGlobals.id, sizeof(size_type));
// Cannot use CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED
diff --git a/src/debug/ee/CMakeLists.txt b/src/debug/ee/CMakeLists.txt
index 5200072353..bd4849e316 100644
--- a/src/debug/ee/CMakeLists.txt
+++ b/src/debug/ee/CMakeLists.txt
@@ -43,6 +43,10 @@ if(WIN32)
dbgtransportproxy.cpp
ddunpack.cpp
)
+else()
+ list(APPEND CORDBEE_SOURCES_WKS
+ dactable.cpp
+ )
endif(WIN32)
if (IS_64BIT_BUILD EQUAL 1)
diff --git a/src/debug/ee/dactable.cpp b/src/debug/ee/dactable.cpp
new file mode 100644
index 0000000000..43b27996d6
--- /dev/null
+++ b/src/debug/ee/dactable.cpp
@@ -0,0 +1,89 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+//*****************************************************************************
+// File: dacglobals.cpp
+//
+
+//
+// The DAC global pointer table
+//
+//*****************************************************************************
+
+#include "stdafx.h"
+#include <daccess.h>
+#include "../../vm/virtualcallstub.h"
+#include "../../vm/win32threadpool.h"
+#include "../../vm/hillclimbing.h"
+#include "../../vm/codeman.h"
+#include "../../vm/eedbginterfaceimpl.h"
+#include "../../vm/common.h"
+#include "../../vm/gcenv.h"
+#include "../../vm/ecall.h"
+#include "../../vm/rcwwalker.h"
+#include "../../gc/gc.h"
+#include "../../gc/gcscan.h"
+
+#undef SERVER_GC
+namespace WKS {
+#include "../../gc/gcimpl.h"
+#include "../../gc/gcpriv.h"
+}
+
+#ifdef DEBUGGING_SUPPORTED
+
+extern PTR_ECHash gFCallMethods;
+extern TADDR gLowestFCall;
+extern TADDR gHighestFCall;
+extern PCODE g_FCDynamicallyAssignedImplementations;
+extern DWORD gThreadTLSIndex;
+extern DWORD gAppDomainTLSIndex;
+
+#ifdef FEATURE_APPX
+#if defined(FEATURE_CORECLR)
+extern BOOL g_fAppX;
+#else
+extern PTR_AppXRTInfo g_pAppXRTInfo;
+#endif
+#endif // FEATURE_APPX
+
+DacGlobals g_dacTable;
+
+// DAC global pointer table initialization
+void DacGlobals::Initialize()
+{
+ TADDR baseAddress = PTR_TO_TADDR(PAL_GetCoreClrModuleBase());
+ g_dacTable.InitializeEntries(baseAddress);
+#ifdef FEATURE_SVR_GC
+ g_dacTable.InitializeSVREntries(baseAddress);
+#endif
+ PAL_PublishDacTableAddress(&g_dacTable, sizeof(g_dacTable));
+}
+
+// Initializes the non-SVR table entries
+void DacGlobals::InitializeEntries(TADDR baseAddress)
+{
+#define DEFINE_DACVAR(id_type, size, id, var) id = PTR_TO_TADDR(&var) - baseAddress;
+#define DEFINE_DACVAR_SVR(id_type, size, id, var)
+#define DEFINE_DACVAR_NO_DUMP(id_type, size, id, var) id = PTR_TO_TADDR(&var) - baseAddress;
+#include "dacvars.h"
+
+#define VPTR_CLASS(name) \
+ { \
+ void *pBuf = _alloca(sizeof(name)); \
+ name *dummy = new (pBuf) name(0); \
+ name##__vtAddr = PTR_TO_TADDR(*((PVOID*)dummy)) - baseAddress; \
+ }
+#define VPTR_MULTI_CLASS(name, keyBase) \
+ { \
+ void *pBuf = _alloca(sizeof(name)); \
+ name *dummy = new (pBuf) name(0); \
+ name##__##keyBase##__mvtAddr = PTR_TO_TADDR(*((PVOID*)dummy)) - baseAddress; \
+ }
+#include <vptr_list.h>
+#undef VPTR_CLASS
+#undef VPTR_MULTI_CLASS
+}
+
+#endif // DEBUGGER_SUPPORTED
diff --git a/src/dlls/mscoree/mscoree.cpp b/src/dlls/mscoree/mscoree.cpp
index 89d91b6f94..4d935d2c73 100644
--- a/src/dlls/mscoree/mscoree.cpp
+++ b/src/dlls/mscoree/mscoree.cpp
@@ -180,7 +180,9 @@ BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
// If buffer is overrun, it is possible the saved callback has been trashed.
// The callback is unsafe.
//SetBufferOverrunHandler();
-
+#ifdef FEATURE_PAL
+ DacGlobals::Initialize();
+#endif
if (!EEDllMain((HINSTANCE)hInstance, dwReason, lpReserved))
{
return FALSE;
@@ -194,6 +196,9 @@ BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
case DLL_PROCESS_DETACH:
{
+#ifdef FEATURE_PAL
+ PAL_CleanupDacTableAddress();
+#endif
EEDllMain((HINSTANCE)hInstance, dwReason, lpReserved);
#ifdef FEATURE_MERGE_JIT_AND_ENGINE
diff --git a/src/gc/gc.h b/src/gc/gc.h
index 455b6dbd6e..60e3dfda5d 100644
--- a/src/gc/gc.h
+++ b/src/gc/gc.h
@@ -356,6 +356,7 @@ void record_changed_seg (BYTE* start, BYTE* end,
#define GC_ALLOC_ALIGN8_BIAS 0x4
class GCHeap {
+ friend struct ::_DacGlobals;
#ifdef DACCESS_COMPILE
friend class ClrDataAccess;
#endif
diff --git a/src/gc/gceesvr.cpp b/src/gc/gceesvr.cpp
index 6778e4a34e..6aa6c063b3 100644
--- a/src/gc/gceesvr.cpp
+++ b/src/gc/gceesvr.cpp
@@ -21,4 +21,15 @@ namespace SVR {
#include "gcee.cpp"
}
-#endif // defined(FEATURE_SVR_GC)
+#if defined(FEATURE_PAL) && !defined(DACCESS_COMPILE)
+
+// Initializes the SVR DAC table entries
+void DacGlobals::InitializeSVREntries(TADDR baseAddress)
+{
+#define DEFINE_DACVAR_SVR(id_type, size, id, var) id = PTR_TO_TADDR(&var) - baseAddress;
+#include "dacvars.h"
+}
+
+#endif // FEATURE_PAL && !DACCESS_COMPILE
+
+#endif // FEATURE_SVR_GC
diff --git a/src/gc/gcpriv.h b/src/gc/gcpriv.h
index c99fd86125..d16f4ba9b1 100644
--- a/src/gc/gcpriv.h
+++ b/src/gc/gcpriv.h
@@ -1112,6 +1112,7 @@ extern void GCProfileWalkHeapWorker(BOOL fProfilerPinned, BOOL fShouldWalkHeapRo
#endif // defined(GC_PROFILING) || defined(FEATURE_EVENT_TRACE)
class gc_heap
{
+ friend struct ::_DacGlobals;
#ifdef DACCESS_COMPILE
friend class ::ClrDataAccess;
friend class ::DacHeapWalker;
diff --git a/src/gc/gcscan.h b/src/gc/gcscan.h
index 3b2fa70e26..9b198b0782 100644
--- a/src/gc/gcscan.h
+++ b/src/gc/gcscan.h
@@ -43,8 +43,10 @@ typedef void enum_alloc_context_func(alloc_context*);
class CNameSpace
{
+ friend struct ::_DacGlobals;
+
public:
-
+
// Called on gc start
static void GcStartDoWork();
diff --git a/src/inc/corhost.h b/src/inc/corhost.h
index d77db20117..133fb9c340 100644
--- a/src/inc/corhost.h
+++ b/src/inc/corhost.h
@@ -631,6 +631,7 @@ class CCLRErrorReportingManager :
#endif // FEATURE_WINDOWSPHONE
{
friend class ClrDataAccess;
+ friend struct _DacGlobals;
SVAL_DECL(ECustomDumpFlavor, g_ECustomDumpFlavor);
@@ -748,6 +749,8 @@ class CorHost2 :
#endif
, public CorExecutionManager
{
+ friend struct _DacGlobals;
+
public:
CorHost2();
diff --git a/src/inc/daccess.h b/src/inc/daccess.h
index fbd7919f93..e4f011b3ef 100644
--- a/src/inc/daccess.h
+++ b/src/inc/daccess.h
@@ -566,8 +566,6 @@ struct DacTableHeader
DacTableInfo info;
};
-#ifdef DACCESS_COMPILE
-
//
// This version of things wraps pointer access in
// templates which understand how to retrieve data
@@ -587,7 +585,6 @@ typedef ULONG_PTR TADDR;
// which reflects the host pointer size.
typedef SIZE_T TSIZE_T;
-extern DacTableInfo g_dacTableInfo;
//
// The following table contains all the global information that data access needs to begin
@@ -597,9 +594,18 @@ extern DacTableInfo g_dacTableInfo;
typedef struct _DacGlobals
{
+#ifdef FEATURE_PAL
+ static void Initialize();
+ void InitializeEntries(TADDR baseAddress);
+#ifdef FEATURE_SVR_GC
+ void InitializeSVREntries(TADDR baseAddress);
+#endif // FEATURE_SVR_GC
+#endif // FEATURE_PAL
+
// These will define all of the dac related mscorwks static and global variables
-#define DEFINE_DACVAR(id_type, size, id) id_type id;
-#define DEFINE_DACVAR_NO_DUMP(id_type, size, id) id_type id;
+#define DEFINE_DACVAR(id_type, size, id, var) id_type id;
+#define DEFINE_DACVAR_SVR(id_type, size, id, var) id_type id;
+#define DEFINE_DACVAR_NO_DUMP(id_type, size, id, var) id_type id;
#include "dacvars.h"
// Global functions.
@@ -625,6 +631,9 @@ typedef struct _DacGlobals
#undef VPTR_MULTI_CLASS
} DacGlobals;
+#ifdef DACCESS_COMPILE
+
+extern DacTableInfo g_dacTableInfo;
extern DacGlobals g_dacGlobals;
#ifdef __cplusplus
@@ -1821,6 +1830,9 @@ typedef __VoidPtr PTR_CVOID;
public: name(TADDR addr, TADDR vtAddr) : base(addr, vtAddr) {} \
VPTR_CLASS_METHODS(name)
+#define VPTR_VTABLE_CLASS_AND_CTOR(name, base) \
+ VPTR_VTABLE_CLASS(name, base)
+
#define VPTR_MULTI_VTABLE_CLASS(name, base) \
public: name(TADDR addr, TADDR vtAddr) : base(addr, vtAddr) {} \
VPTR_MULTI_CLASS_METHODS(name, base)
@@ -1842,6 +1854,9 @@ public: name(TADDR addr, TADDR vtAddr); \
public: name(TADDR addr, TADDR vtAddr) {} \
virtual ULONG32 VPtrSize(void) = 0;
+#define VPTR_BASE_VTABLE_CLASS_AND_CTOR(name) \
+ VPTR_BASE_VTABLE_CLASS(name)
+
#define VPTR_BASE_VTABLE_CLASS_NO_CTOR_BODY(name) \
public: name(TADDR addr, TADDR vtAddr); \
virtual ULONG32 VPtrSize(void) = 0;
@@ -2085,12 +2100,49 @@ typedef const void* PTR_CVOID;
#define S8PTRMAX(type, maxChars) type*
#define S16PTR(type) type*
#define S16PTRMAX(type, maxChars) type*
+
+#if defined(FEATURE_PAL)
+
+#define VPTR_VTABLE_CLASS(name, base) \
+ friend struct _DacGlobals; \
+public: name(int dummy) : base(dummy) {}
+
+#define VPTR_VTABLE_CLASS_AND_CTOR(name, base) \
+ VPTR_VTABLE_CLASS(name, base) \
+ name() : base() {}
+
+#define VPTR_MULTI_VTABLE_CLASS(name, base) \
+ friend struct _DacGlobals; \
+public: name(int dummy) : base(dummy) {}
+
+#define VPTR_BASE_CONCRETE_VTABLE_CLASS(name) \
+ friend struct _DacGlobals; \
+public: name(int dummy) {}
+
+#define VPTR_BASE_VTABLE_CLASS(name) \
+ friend struct _DacGlobals; \
+public: name(int dummy) {}
+
+#define VPTR_BASE_VTABLE_CLASS_AND_CTOR(name) \
+ VPTR_BASE_VTABLE_CLASS(name) \
+ name() {}
+
+#define VPTR_ABSTRACT_VTABLE_CLASS(name, base) \
+ friend struct _DacGlobals; \
+public: name(int dummy) : base(dummy) {}
+
+#else // FEATURE_PAL
+
#define VPTR_VTABLE_CLASS(name, base)
+#define VPTR_VTABLE_CLASS_AND_CTOR(name, base)
#define VPTR_MULTI_VTABLE_CLASS(name, base)
#define VPTR_BASE_CONCRETE_VTABLE_CLASS(name)
#define VPTR_BASE_VTABLE_CLASS(name)
+#define VPTR_BASE_VTABLE_CLASS_AND_CTOR(name)
#define VPTR_ABSTRACT_VTABLE_CLASS(name, base)
+#endif // FEATURE_PAL
+
// helper macro to make the vtables unique for DAC
#define VPTR_UNIQUE(unique) virtual int MakeVTableUniqueForDAC() { STATIC_CONTRACT_SO_TOLERANT; return unique; }
#define VPTR_UNIQUE_BaseDomain (100000)
diff --git a/src/inc/dacvars.h b/src/inc/dacvars.h
index 4cf0c4b12b..35006f1aa5 100644
--- a/src/inc/dacvars.h
+++ b/src/inc/dacvars.h
@@ -13,8 +13,8 @@
// DEFINE_DACVAR macro & include dacvars.h like so (see enummem.cpp and/or
// daccess.h for examples):
//
-// #define DEFINE_DACVAR(type, size, id) type id; //this defn. discards
-// //the size
+// #define DEFINE_DACVAR(type, size, id, var) type id; //this defn. discards
+// //the size
// #include "dacvars.h"
//
// @dbgtodo:
@@ -47,6 +47,10 @@
// member, the name should be <class_name>__<member_name>. If the variable is a
// global, the name should be <dac>__<global_name>.
// * * *
+// The FOURTH ARGUMENT should be the actual name of the static/global variable. If
+// static data the should be [<namespace>::]<class_name>::<member_name>. If global,
+// it should look like <global_name>.
+// * * *
// If you need to add an entry to this file, your type may not be visible when
// this file is compiled. In that case, you need to do one of two things:
// - If the type is a pointer type, you can simply use UNKNOWN_POINTER_TYPE as the
@@ -58,258 +62,264 @@
// nothing will be dumped.
#ifndef DEFINE_DACVAR
-#define DEFINE_DACVAR(type, true_type, id)
+#define DEFINE_DACVAR(type, true_type, id, var)
#endif
-#define UNKNOWN_POINTER_TYPE SIZE_T
+// Use this macro for any server (namespace SVR) variables
+#ifndef DEFINE_DACVAR_SVR
+#define DEFINE_DACVAR_SVR(type, true_type, id, var)
+#endif
// Use this macro to define a static var that is known to DAC, but not captured in a dump.
#ifndef DEFINE_DACVAR_NO_DUMP
-#define DEFINE_DACVAR_NO_DUMP(type, true_type, id)
+#define DEFINE_DACVAR_NO_DUMP(type, true_type, id, var)
#endif
-DEFINE_DACVAR(ULONG, PTR_RangeSection, ExecutionManager__m_CodeRangeList)
-DEFINE_DACVAR(ULONG, PTR_EECodeManager, ExecutionManager__m_pDefaultCodeMan)
-DEFINE_DACVAR(ULONG, LONG, ExecutionManager__m_dwReaderCount)
-DEFINE_DACVAR(ULONG, LONG, ExecutionManager__m_dwWriterLock)
+#define UNKNOWN_POINTER_TYPE SIZE_T
+
+DEFINE_DACVAR(ULONG, PTR_RangeSection, ExecutionManager__m_CodeRangeList, ExecutionManager::m_CodeRangeList)
+DEFINE_DACVAR(ULONG, PTR_EECodeManager, ExecutionManager__m_pDefaultCodeMan, ExecutionManager::m_pDefaultCodeMan)
+DEFINE_DACVAR(ULONG, LONG, ExecutionManager__m_dwReaderCount, ExecutionManager::m_dwReaderCount)
+DEFINE_DACVAR(ULONG, LONG, ExecutionManager__m_dwWriterLock, ExecutionManager::m_dwWriterLock)
-DEFINE_DACVAR(ULONG, PTR_EEJitManager, ExecutionManager__m_pEEJitManager)
+DEFINE_DACVAR(ULONG, PTR_EEJitManager, ExecutionManager__m_pEEJitManager, ExecutionManager::m_pEEJitManager)
#ifdef FEATURE_PREJIT
-DEFINE_DACVAR(ULONG, PTR_NativeImageJitManager, ExecutionManager__m_pNativeImageJitManager)
+DEFINE_DACVAR(ULONG, PTR_NativeImageJitManager, ExecutionManager__m_pNativeImageJitManager, ExecutionManager::m_pNativeImageJitManager)
#endif
#ifdef FEATURE_READYTORUN
-DEFINE_DACVAR(ULONG, PTR_ReadyToRunJitManager, ExecutionManager__m_pReadyToRunJitManager)
+DEFINE_DACVAR(ULONG, PTR_ReadyToRunJitManager, ExecutionManager__m_pReadyToRunJitManager, ExecutionManager::m_pReadyToRunJitManager)
#endif
-DEFINE_DACVAR_NO_DUMP(ULONG, VMHELPDEF *, dac__hlpFuncTable)
-DEFINE_DACVAR(ULONG, VMHELPDEF *, dac__hlpDynamicFuncTable)
+DEFINE_DACVAR_NO_DUMP(ULONG, VMHELPDEF *, dac__hlpFuncTable, ::hlpFuncTable)
+DEFINE_DACVAR(ULONG, VMHELPDEF *, dac__hlpDynamicFuncTable, ::hlpDynamicFuncTable)
#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-DEFINE_DACVAR(ULONG, PTR_ConnectionNameTable, CCLRDebugManager__m_pConnectionNameHash)
+DEFINE_DACVAR(ULONG, PTR_ConnectionNameTable, CCLRDebugManager__m_pConnectionNameHash, CCLRDebugManager::m_pConnectionNameHash)
#endif // FEATURE_INCLUDE_ALL_INTERFACES
-DEFINE_DACVAR(ULONG, PTR_StubManager, StubManager__g_pFirstManager)
-DEFINE_DACVAR(ULONG, PTR_PrecodeStubManager, PrecodeStubManager__g_pManager)
-DEFINE_DACVAR(ULONG, PTR_StubLinkStubManager, StubLinkStubManager__g_pManager)
-DEFINE_DACVAR(ULONG, PTR_ThunkHeapStubManager, ThunkHeapStubManager__g_pManager)
-DEFINE_DACVAR(ULONG, PTR_JumpStubStubManager, JumpStubStubManager__g_pManager)
-DEFINE_DACVAR(ULONG, PTR_RangeSectionStubManager, RangeSectionStubManager__g_pManager)
-DEFINE_DACVAR(ULONG, PTR_DelegateInvokeStubManager, DelegateInvokeStubManager__g_pManager)
-DEFINE_DACVAR(ULONG, PTR_VirtualCallStubManagerManager, VirtualCallStubManagerManager__g_pManager)
-
-DEFINE_DACVAR(ULONG, PTR_ThreadStore, ThreadStore__s_pThreadStore)
-
-DEFINE_DACVAR(ULONG, int, ThreadpoolMgr__cpuUtilization)
-DEFINE_DACVAR(ULONG, ThreadpoolMgr::ThreadCounter, ThreadpoolMgr__WorkerCounter)
-DEFINE_DACVAR(ULONG, int, ThreadpoolMgr__MinLimitTotalWorkerThreads)
-DEFINE_DACVAR(ULONG, DWORD, ThreadpoolMgr__MaxLimitTotalWorkerThreads)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_WorkRequest*/, ThreadpoolMgr__WorkRequestHead) // PTR_WorkRequest is not defined. So use a pointer type
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_WorkRequest*/, ThreadpoolMgr__WorkRequestTail) //
-DEFINE_DACVAR(ULONG, ThreadpoolMgr::ThreadCounter, ThreadpoolMgr__CPThreadCounter)
-DEFINE_DACVAR(ULONG, LONG, ThreadpoolMgr__MaxFreeCPThreads)
-DEFINE_DACVAR(ULONG, LONG, ThreadpoolMgr__MaxLimitTotalCPThreads)
-DEFINE_DACVAR(ULONG, LONG, ThreadpoolMgr__MinLimitTotalCPThreads)
-DEFINE_DACVAR(ULONG, LIST_ENTRY, ThreadpoolMgr__TimerQueue)
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__HillClimbingLog)
-DEFINE_DACVAR(ULONG, int, dac__HillClimbingLogFirstIndex)
-DEFINE_DACVAR(ULONG, int, dac__HillClimbingLogSize)
-
-DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pFinalizerThread)
-DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pSuspensionThread)
+DEFINE_DACVAR(ULONG, PTR_StubManager, StubManager__g_pFirstManager, StubManager::g_pFirstManager)
+DEFINE_DACVAR(ULONG, PTR_PrecodeStubManager, PrecodeStubManager__g_pManager, PrecodeStubManager::g_pManager)
+DEFINE_DACVAR(ULONG, PTR_StubLinkStubManager, StubLinkStubManager__g_pManager, StubLinkStubManager::g_pManager)
+DEFINE_DACVAR(ULONG, PTR_ThunkHeapStubManager, ThunkHeapStubManager__g_pManager, ThunkHeapStubManager::g_pManager)
+DEFINE_DACVAR(ULONG, PTR_JumpStubStubManager, JumpStubStubManager__g_pManager, JumpStubStubManager::g_pManager)
+DEFINE_DACVAR(ULONG, PTR_RangeSectionStubManager, RangeSectionStubManager__g_pManager, RangeSectionStubManager::g_pManager)
+DEFINE_DACVAR(ULONG, PTR_DelegateInvokeStubManager, DelegateInvokeStubManager__g_pManager, DelegateInvokeStubManager::g_pManager)
+DEFINE_DACVAR(ULONG, PTR_VirtualCallStubManagerManager, VirtualCallStubManagerManager__g_pManager, VirtualCallStubManagerManager::g_pManager)
+
+DEFINE_DACVAR(ULONG, PTR_ThreadStore, ThreadStore__s_pThreadStore, ThreadStore::s_pThreadStore)
+
+DEFINE_DACVAR(ULONG, int, ThreadpoolMgr__cpuUtilization, ThreadpoolMgr::cpuUtilization)
+DEFINE_DACVAR(ULONG, ThreadpoolMgr::ThreadCounter, ThreadpoolMgr__WorkerCounter, ThreadpoolMgr::WorkerCounter)
+DEFINE_DACVAR(ULONG, int, ThreadpoolMgr__MinLimitTotalWorkerThreads, ThreadpoolMgr::MinLimitTotalWorkerThreads)
+DEFINE_DACVAR(ULONG, DWORD, ThreadpoolMgr__MaxLimitTotalWorkerThreads, ThreadpoolMgr::MaxLimitTotalWorkerThreads)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_WorkRequest*/, ThreadpoolMgr__WorkRequestHead, ThreadpoolMgr::WorkRequestHead) // PTR_WorkRequest is not defined. So use a pointer type
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_WorkRequest*/, ThreadpoolMgr__WorkRequestTail, ThreadpoolMgr::WorkRequestTail) //
+DEFINE_DACVAR(ULONG, ThreadpoolMgr::ThreadCounter, ThreadpoolMgr__CPThreadCounter, ThreadpoolMgr::CPThreadCounter)
+DEFINE_DACVAR(ULONG, LONG, ThreadpoolMgr__MaxFreeCPThreads, ThreadpoolMgr::MaxFreeCPThreads)
+DEFINE_DACVAR(ULONG, LONG, ThreadpoolMgr__MaxLimitTotalCPThreads, ThreadpoolMgr::MaxLimitTotalCPThreads)
+DEFINE_DACVAR(ULONG, LONG, ThreadpoolMgr__MinLimitTotalCPThreads, ThreadpoolMgr::MinLimitTotalCPThreads)
+DEFINE_DACVAR(ULONG, LIST_ENTRY, ThreadpoolMgr__TimerQueue, ThreadpoolMgr::TimerQueue)
+DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__HillClimbingLog, ::HillClimbingLog)
+DEFINE_DACVAR(ULONG, int, dac__HillClimbingLogFirstIndex, ::HillClimbingLogFirstIndex)
+DEFINE_DACVAR(ULONG, int, dac__HillClimbingLogSize, ::HillClimbingLogSize)
+
+DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pFinalizerThread, ::g_pFinalizerThread)
+DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pSuspensionThread, ::g_pSuspensionThread)
#ifdef FEATURE_SVR_GC
-DEFINE_DACVAR(ULONG, DWORD, GCHeap__gcHeapType)
+DEFINE_DACVAR(ULONG, DWORD, GCHeap__gcHeapType, GCHeap::gcHeapType)
#endif // FEATURE_SVR_GC
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__alloc_allocated)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_heap_segment*/, WKS__gc_heap__ephemeral_heap_segment)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_CFinalize*/, WKS__gc_heap__finalize_queue)
+DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__alloc_allocated, WKS::gc_heap::alloc_allocated)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_heap_segment*/, WKS__gc_heap__ephemeral_heap_segment, WKS::gc_heap::ephemeral_heap_segment)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_CFinalize*/, WKS__gc_heap__finalize_queue, WKS::gc_heap::finalize_queue)
// Can not use MULTIPLE_HEAPS here because desktop build contains it is not defined for workstation GC
// but we include workstation GC in mscorwks.dll.
#ifdef FEATURE_SVR_GC
-DEFINE_DACVAR(ULONG, int, SVR__gc_heap__n_heaps)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*(PTR_gc_heap*)*/, SVR__gc_heap__g_heaps)
+DEFINE_DACVAR_SVR(ULONG, int, SVR__gc_heap__n_heaps, SVR::gc_heap::n_heaps)
+DEFINE_DACVAR_SVR(ULONG, UNKNOWN_POINTER_TYPE /*(PTR_gc_heap*)*/, SVR__gc_heap__g_heaps, SVR::gc_heap::g_heaps)
#endif // FEATURE_SVR_GC
-DEFINE_DACVAR(ULONG, oom_history, WKS__gc_heap__oom_info)
+DEFINE_DACVAR(ULONG, oom_history, WKS__gc_heap__oom_info, WKS::gc_heap::oom_info)
-DEFINE_DACVAR(ULONG, PTR_SystemDomain, SystemDomain__m_pSystemDomain)
-DEFINE_DACVAR(ULONG, ArrayListStatic, SystemDomain__m_appDomainIndexList)
-DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceDebug)
-DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceProfiling)
-DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceInstrument)
-DEFINE_DACVAR(ULONG, PTR_SharedDomain, SharedDomain__m_pSharedDomain)
+DEFINE_DACVAR(ULONG, PTR_SystemDomain, SystemDomain__m_pSystemDomain, SystemDomain::m_pSystemDomain)
+DEFINE_DACVAR(ULONG, ArrayListStatic, SystemDomain__m_appDomainIndexList, SystemDomain::m_appDomainIndexList)
+DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceDebug, SystemDomain::s_fForceDebug)
+DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceProfiling, SystemDomain::s_fForceProfiling)
+DEFINE_DACVAR(ULONG, BOOL, SystemDomain__s_fForceInstrument, SystemDomain::s_fForceInstrument)
+DEFINE_DACVAR(ULONG, PTR_SharedDomain, SharedDomain__m_pSharedDomain, SharedDomain::m_pSharedDomain)
-DEFINE_DACVAR(ULONG, DWORD, CExecutionEngine__TlsIndex)
+DEFINE_DACVAR(ULONG, DWORD, CExecutionEngine__TlsIndex, CExecutionEngine::TlsIndex)
-DEFINE_DACVAR(ULONG, LONG, CNameSpace__m_GcStructuresInvalidCnt)
+DEFINE_DACVAR(ULONG, LONG, CNameSpace__m_GcStructuresInvalidCnt, CNameSpace::m_GcStructuresInvalidCnt)
#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
-DEFINE_DACVAR(ULONG, int, CCLRErrorReportingManager__g_ECustomDumpFlavor)
+DEFINE_DACVAR(ULONG, int, CCLRErrorReportingManager__g_ECustomDumpFlavor, CCLRErrorReportingManager::g_ECustomDumpFlavor)
#endif
-DEFINE_DACVAR(ULONG, PTR_SString, SString__s_Empty)
+DEFINE_DACVAR(ULONG, PTR_SString, SString__s_Empty, SString::s_Empty)
#ifdef FEATURE_APPX
#if defined(FEATURE_CORECLR)
-DEFINE_DACVAR(ULONG, BOOL, dac__g_fAppX)
+DEFINE_DACVAR(ULONG, BOOL, dac__g_fAppX, ::g_fAppX)
#else
-DEFINE_DACVAR(ULONG, PTR_AppXRTInfo, dac__g_pAppXRTInfo)
+DEFINE_DACVAR(ULONG, PTR_AppXRTInfo, dac__g_pAppXRTInfo, ::g_pAppXRTInfo)
#endif
#endif // FEATURE_APPX
-DEFINE_DACVAR(ULONG, BOOL, SString__s_IsANSIMultibyte)
+DEFINE_DACVAR(ULONG, BOOL, SString__s_IsANSIMultibyte, SString::s_IsANSIMultibyte)
#ifdef FEATURE_REMOTING
-DEFINE_DACVAR_NO_DUMP(ULONG, MethodTable, CTPMethodTable__s_pThunkTable)
+DEFINE_DACVAR_NO_DUMP(ULONG, MethodTable, CTPMethodTable__s_pThunkTable, CTPMethodTable::s_pThunkTable)
#endif // FEATURE_REMOTING
-DEFINE_DACVAR(ULONG, INT32, ArrayBase__s_arrayBoundsZero)
+DEFINE_DACVAR(ULONG, INT32, ArrayBase__s_arrayBoundsZero, ArrayBase::s_arrayBoundsZero)
-DEFINE_DACVAR(ULONG, BOOL, StackwalkCache__s_Enabled)
+DEFINE_DACVAR(ULONG, BOOL, StackwalkCache__s_Enabled, StackwalkCache::s_Enabled)
-DEFINE_DACVAR(ULONG, PTR_JITNotification, dac__g_pNotificationTable)
-DEFINE_DACVAR(ULONG, ULONG32, dac__g_dacNotificationFlags)
-DEFINE_DACVAR(ULONG, PTR_GcNotification, dac__g_pGcNotificationTable)
+DEFINE_DACVAR(ULONG, PTR_JITNotification, dac__g_pNotificationTable, ::g_pNotificationTable)
+DEFINE_DACVAR(ULONG, ULONG32, dac__g_dacNotificationFlags, ::g_dacNotificationFlags)
+DEFINE_DACVAR(ULONG, PTR_GcNotification, dac__g_pGcNotificationTable, ::g_pGcNotificationTable)
#ifndef FEATURE_IMPLICIT_TLS
-DEFINE_DACVAR(ULONG, DWORD, dac__gThreadTLSIndex)
-DEFINE_DACVAR(ULONG, DWORD, dac__gAppDomainTLSIndex)
+DEFINE_DACVAR(ULONG, DWORD, dac__gThreadTLSIndex, ::gThreadTLSIndex)
+DEFINE_DACVAR(ULONG, DWORD, dac__gAppDomainTLSIndex, ::gAppDomainTLSIndex)
#endif
-DEFINE_DACVAR(ULONG, PTR_EEConfig, dac__g_pConfig)
+DEFINE_DACVAR(ULONG, PTR_EEConfig, dac__g_pConfig, ::g_pConfig)
-DEFINE_DACVAR(ULONG, MscorlibBinder, dac__g_Mscorlib)
+DEFINE_DACVAR(ULONG, MscorlibBinder, dac__g_Mscorlib, ::g_Mscorlib)
#if defined(PROFILING_SUPPORTED) || defined(PROFILING_SUPPORTED_DATA)
-DEFINE_DACVAR(ULONG, ProfControlBlock, dac__g_profControlBlock)
+DEFINE_DACVAR(ULONG, ProfControlBlock, dac__g_profControlBlock, ::g_profControlBlock)
#endif // defined(PROFILING_SUPPORTED) || defined(PROFILING_SUPPORTED_DATA)
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__generation_table)
-DEFINE_DACVAR(ULONG, PTR_DWORD, dac__g_card_table)
-DEFINE_DACVAR(ULONG, PTR_BYTE, dac__g_lowest_address)
-DEFINE_DACVAR(ULONG, PTR_BYTE, dac__g_highest_address)
-
-DEFINE_DACVAR(ULONG, GCHeap, dac__g_pGCHeap)
-
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThinLockThreadIdDispenser)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pModuleIndexDispenser)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pRuntimeTypeClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pCanonMethodTableClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pStringClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pArrayClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pSZArrayHelperClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pNullableClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExceptionClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThreadAbortExceptionClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pOutOfMemoryExceptionClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pStackOverflowExceptionClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExecutionEngineExceptionClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pDelegateClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pMulticastDelegateClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pFreeObjectMethodTable)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pOverlappedDataClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pValueTypeClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pEnumClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThreadClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pCriticalFinalizerObjectClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pAsyncFileStream_AsyncResultClass)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pPredefinedArrayTypes)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_ArgumentHandleMT)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_ArgIteratorMT)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_TypedReferenceMT)
+DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__generation_table, WKS::generation_table)
+DEFINE_DACVAR(ULONG, PTR_DWORD, dac__g_card_table, ::g_card_table)
+DEFINE_DACVAR(ULONG, PTR_BYTE, dac__g_lowest_address, ::g_lowest_address)
+DEFINE_DACVAR(ULONG, PTR_BYTE, dac__g_highest_address, ::g_highest_address)
+
+DEFINE_DACVAR(ULONG, GCHeap, dac__g_pGCHeap, ::g_pGCHeap)
+
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThinLockThreadIdDispenser, ::g_pThinLockThreadIdDispenser)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pModuleIndexDispenser, ::g_pModuleIndexDispenser)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectClass, ::g_pObjectClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pRuntimeTypeClass, ::g_pRuntimeTypeClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pCanonMethodTableClass, ::g_pCanonMethodTableClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pStringClass, ::g_pStringClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pArrayClass, ::g_pArrayClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pSZArrayHelperClass, ::g_pSZArrayHelperClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pNullableClass, ::g_pNullableClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExceptionClass, ::g_pExceptionClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThreadAbortExceptionClass, ::g_pThreadAbortExceptionClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pOutOfMemoryExceptionClass, ::g_pOutOfMemoryExceptionClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pStackOverflowExceptionClass, ::g_pStackOverflowExceptionClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExecutionEngineExceptionClass, ::g_pExecutionEngineExceptionClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pDelegateClass, ::g_pDelegateClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pMulticastDelegateClass, ::g_pMulticastDelegateClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pFreeObjectMethodTable, ::g_pFreeObjectMethodTable)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pOverlappedDataClass, ::g_pOverlappedDataClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pValueTypeClass, ::g_pValueTypeClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pEnumClass, ::g_pEnumClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThreadClass, ::g_pThreadClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pCriticalFinalizerObjectClass, ::g_pCriticalFinalizerObjectClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pAsyncFileStream_AsyncResultClass, ::g_pAsyncFileStream_AsyncResultClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pPredefinedArrayTypes, ::g_pPredefinedArrayTypes)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_ArgumentHandleMT, ::g_ArgumentHandleMT)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_ArgIteratorMT, ::g_ArgIteratorMT)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_TypedReferenceMT, ::g_TypedReferenceMT)
#ifdef FEATURE_COMINTEROP
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pBaseCOMObject)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pBaseRuntimeClass)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pBaseCOMObject, ::g_pBaseCOMObject)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pBaseRuntimeClass, ::g_pBaseRuntimeClass)
#endif
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pPrepareConstrainedRegionsMethod)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExecuteBackoutCodeHelperMethod)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pPrepareConstrainedRegionsMethod, ::g_pPrepareConstrainedRegionsMethod)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExecuteBackoutCodeHelperMethod, ::g_pExecuteBackoutCodeHelperMethod)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectCtorMD)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectFinalizerMD)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectCtorMD, ::g_pObjectCtorMD)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectFinalizerMD, ::g_pObjectFinalizerMD)
-DEFINE_DACVAR(ULONG, bool, dac__g_fProcessDetach)
-DEFINE_DACVAR(ULONG, DWORD, dac__g_fEEShutDown)
-DEFINE_DACVAR(ULONG, DWORD, dac__g_fHostConfig)
+DEFINE_DACVAR(ULONG, bool, dac__g_fProcessDetach, ::g_fProcessDetach)
+DEFINE_DACVAR(ULONG, DWORD, dac__g_fEEShutDown, ::g_fEEShutDown)
+DEFINE_DACVAR(ULONG, DWORD, dac__g_fHostConfig, ::g_fHostConfig)
-DEFINE_DACVAR(ULONG, ULONG, dac__g_CORDebuggerControlFlags)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pDebugger)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pDebugInterface)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pEEDbgInterfaceImpl)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pEEInterface)
+DEFINE_DACVAR(ULONG, ULONG, dac__g_CORDebuggerControlFlags, ::g_CORDebuggerControlFlags)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pDebugger, ::g_pDebugger)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pDebugInterface, ::g_pDebugInterface)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pEEDbgInterfaceImpl, ::g_pEEDbgInterfaceImpl)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pEEInterface, ::g_pEEInterface)
-DEFINE_DACVAR(ULONG, BOOL, Debugger__s_fCanChangeNgenFlags)
+DEFINE_DACVAR(ULONG, BOOL, Debugger__s_fCanChangeNgenFlags, Debugger::s_fCanChangeNgenFlags)
-DEFINE_DACVAR(ULONG, PTR_DebuggerPatchTable, DebuggerController__g_patches)
-DEFINE_DACVAR(ULONG, BOOL, DebuggerController__g_patchTableValid)
+DEFINE_DACVAR(ULONG, PTR_DebuggerPatchTable, DebuggerController__g_patches, DebuggerController::g_patches)
+DEFINE_DACVAR(ULONG, BOOL, DebuggerController__g_patchTableValid, DebuggerController::g_patchTableValid)
-DEFINE_DACVAR(ULONG, SIZE_T, dac__gLowestFCall)
-DEFINE_DACVAR(ULONG, SIZE_T, dac__gHighestFCall)
-DEFINE_DACVAR(ULONG, SIZE_T, dac__gFCallMethods)
+DEFINE_DACVAR(ULONG, SIZE_T, dac__gLowestFCall, ::gLowestFCall)
+DEFINE_DACVAR(ULONG, SIZE_T, dac__gHighestFCall, ::gHighestFCall)
+DEFINE_DACVAR(ULONG, SIZE_T, dac__gFCallMethods, ::gFCallMethods)
-DEFINE_DACVAR(ULONG, PTR_SyncTableEntry, dac__g_pSyncTable)
+DEFINE_DACVAR(ULONG, PTR_SyncTableEntry, dac__g_pSyncTable, ::g_pSyncTable)
#ifdef FEATURE_COMINTEROP
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pRCWCleanupList)
-DEFINE_DACVAR(ULONG, BOOL, RCWWalker__s_bIsGlobalPeggingOn);
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pRCWCleanupList, ::g_pRCWCleanupList)
+DEFINE_DACVAR(ULONG, BOOL, RCWWalker__s_bIsGlobalPeggingOn, RCWWalker::s_bIsGlobalPeggingOn)
#endif // FEATURE_COMINTEROP
#ifndef FEATURE_PAL
-DEFINE_DACVAR(ULONG, SIZE_T, dac__g_runtimeLoadedBaseAddress)
-DEFINE_DACVAR(ULONG, SIZE_T, dac__g_runtimeVirtualSize)
+DEFINE_DACVAR(ULONG, SIZE_T, dac__g_runtimeLoadedBaseAddress, ::g_runtimeLoadedBaseAddress)
+DEFINE_DACVAR(ULONG, SIZE_T, dac__g_runtimeVirtualSize, ::g_runtimeVirtualSize)
#endif // !FEATURE_PAL
-DEFINE_DACVAR(ULONG, SyncBlockCache *, SyncBlockCache__s_pSyncBlockCache)
+DEFINE_DACVAR(ULONG, SyncBlockCache *, SyncBlockCache__s_pSyncBlockCache, SyncBlockCache::s_pSyncBlockCache)
-DEFINE_DACVAR(ULONG, HandleTableMap, dac__g_HandleTableMap)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pStressLog)
+DEFINE_DACVAR(ULONG, HandleTableMap, dac__g_HandleTableMap, ::g_HandleTableMap)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pStressLog, ::g_pStressLog)
-DEFINE_DACVAR(ULONG, SIZE_T, dac__s_gsCookie)
+DEFINE_DACVAR(ULONG, SIZE_T, dac__s_gsCookie, ::s_gsCookie)
#ifdef FEATURE_IPCMAN
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pIPCManagerInterface)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pIPCManagerInterface, ::g_pIPCManagerInterface)
#endif // FEATURE_IPCMAN
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__g_FCDynamicallyAssignedImplementations)
+DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__g_FCDynamicallyAssignedImplementations, ::g_FCDynamicallyAssignedImplementations)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*BYTE**/, WKS__gc_heap__internal_root_array)
-DEFINE_DACVAR(ULONG, size_t, WKS__gc_heap__internal_root_array_index)
-DEFINE_DACVAR(ULONG, ULONG, WKS__gc_heap__heap_analyze_success)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*BYTE**/, WKS__gc_heap__internal_root_array, WKS::gc_heap::internal_root_array)
+DEFINE_DACVAR(ULONG, size_t, WKS__gc_heap__internal_root_array_index, WKS::gc_heap::internal_root_array_index)
+DEFINE_DACVAR(ULONG, ULONG, WKS__gc_heap__heap_analyze_success, WKS::gc_heap::heap_analyze_success)
-DEFINE_DACVAR(ULONG, SIZE_T, WKS__gc_heap__mark_array)
-DEFINE_DACVAR(ULONG, SIZE_T, WKS__gc_heap__current_c_gc_state)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__next_sweep_obj)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /* PTR_heap_segment */, WKS__gc_heap__saved_sweep_ephemeral_seg)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__saved_sweep_ephemeral_start)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_lowest_address)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_highest_address)
+DEFINE_DACVAR(ULONG, SIZE_T, WKS__gc_heap__mark_array, WKS::gc_heap::mark_array)
+DEFINE_DACVAR(ULONG, SIZE_T, WKS__gc_heap__current_c_gc_state, WKS::gc_heap::current_c_gc_state)
+DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__next_sweep_obj, WKS::gc_heap::next_sweep_obj)
+DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /* PTR_heap_segment */, WKS__gc_heap__saved_sweep_ephemeral_seg, WKS::gc_heap::saved_sweep_ephemeral_seg)
+DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__saved_sweep_ephemeral_start, WKS::gc_heap::saved_sweep_ephemeral_start)
+DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_lowest_address, WKS::gc_heap::background_saved_lowest_address)
+DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_highest_address, WKS::gc_heap::background_saved_highest_address)
#ifdef FEATURE_CORECLR
-DEFINE_DACVAR(ULONG, HANDLE, dac__g_hContinueStartupEvent)
-DEFINE_DACVAR(ULONG, DWORD, CorHost2__m_dwStartupFlags)
+DEFINE_DACVAR(ULONG, HANDLE, dac__g_hContinueStartupEvent, ::g_hContinueStartupEvent)
+DEFINE_DACVAR(ULONG, DWORD, CorHost2__m_dwStartupFlags, CorHost2::m_dwStartupFlags)
#endif // FEATURE_CORECLR
-DEFINE_DACVAR(ULONG, HRESULT, dac__g_hrFatalError)
+DEFINE_DACVAR(ULONG, HRESULT, dac__g_hrFatalError, ::g_hrFatalError)
#if defined(DEBUGGING_SUPPORTED) && defined (FEATURE_PREJIT)
- DEFINE_DACVAR(ULONG, DWORD, PEFile__s_NGENDebugFlags)
+ DEFINE_DACVAR(ULONG, DWORD, PEFile__s_NGENDebugFlags, PEFile::s_NGENDebugFlags)
#endif //defined(DEBUGGING_SUPPORTED) && defined (FEATURE_PREJIT)
#ifndef FEATURE_CORECLR
-DEFINE_DACVAR(ULONG, DWORD, AssemblyUsageLogManager__s_UsageLogFlags)
+DEFINE_DACVAR(ULONG, DWORD, AssemblyUsageLogManager__s_UsageLogFlags, AssemblyUsageLogManager::s_UsageLogFlags)
#endif // FEATURE_CORECLR
#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
-DEFINE_DACVAR(ULONG, PTR_CLRPrivBinderAppX, CLRPrivBinderAppX__s_pSingleton)
+DEFINE_DACVAR(ULONG, PTR_CLRPrivBinderAppX, CLRPrivBinderAppX__s_pSingleton, CLRPrivBinderAppX::s_pSingleton)
#endif //defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX)
#ifdef FEATURE_MINIMETADATA_IN_TRIAGEDUMPS
-DEFINE_DACVAR(ULONG, DWORD, dac__g_MiniMetaDataBuffMaxSize)
-DEFINE_DACVAR(ULONG, TADDR, dac__g_MiniMetaDataBuffAddress)
+DEFINE_DACVAR(ULONG, DWORD, dac__g_MiniMetaDataBuffMaxSize, ::g_MiniMetaDataBuffMaxSize)
+DEFINE_DACVAR(ULONG, TADDR, dac__g_MiniMetaDataBuffAddress, ::g_MiniMetaDataBuffAddress)
#endif // FEATURE_MINIMETADATA_IN_TRIAGEDUMPS
#undef DEFINE_DACVAR
+#undef DEFINE_DACVAR_SVR
#undef DEFINE_DACVAR_NO_DUMP
diff --git a/src/inc/eetwain.h b/src/inc/eetwain.h
index b88af6fba2..9143729906 100644
--- a/src/inc/eetwain.h
+++ b/src/inc/eetwain.h
@@ -133,7 +133,7 @@ enum GenericParamContextType
class ICodeManager
{
- VPTR_BASE_VTABLE_CLASS(ICodeManager)
+ VPTR_BASE_VTABLE_CLASS_AND_CTOR(ICodeManager)
public:
@@ -353,7 +353,7 @@ struct hdrInfo;
class EECodeManager : public ICodeManager {
- VPTR_VTABLE_CLASS(EECodeManager, ICodeManager)
+ VPTR_VTABLE_CLASS_AND_CTOR(EECodeManager, ICodeManager)
public:
diff --git a/src/inc/sstring.h b/src/inc/sstring.h
index 31329e2856..a42d71155e 100644
--- a/src/inc/sstring.h
+++ b/src/inc/sstring.h
@@ -73,6 +73,8 @@ typedef const UTF8 *LPCUTF8;
typedef DPTR(class SString) PTR_SString;
class SString : private SBuffer
{
+ friend struct _DacGlobals;
+
private:
enum Representation
{
@@ -757,7 +759,6 @@ private:
SString(void *buffer, COUNT_T size);
private:
-
static int CaseCompareHelperA(const CHAR *buffer1, const CHAR *buffer2, COUNT_T count, LocaleID lcid, BOOL stopOnNull, BOOL stopOnCount);
static int CaseCompareHelper(const WCHAR *buffer1, const WCHAR *buffer2, COUNT_T count, LocaleID lcid, BOOL stopOnNull, BOOL stopOnCount);
diff --git a/src/inc/vptr_list.h b/src/inc/vptr_list.h
index a5198bb89f..352f6f83a0 100644
--- a/src/inc/vptr_list.h
+++ b/src/inc/vptr_list.h
@@ -153,5 +153,7 @@ VPTR_CLASS(GlobalLoaderAllocator)
VPTR_CLASS(AppDomainLoaderAllocator)
VPTR_CLASS(AssemblyLoaderAllocator)
+#ifndef FEATURE_PAL
VPTR_CLASS(AssemblySecurityDescriptor)
VPTR_CLASS(ApplicationSecurityDescriptor)
+#endif // FEATURE_PAL
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index de924fc424..8516ce95c9 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -566,6 +566,30 @@ PAL_DeleteExecWatchpoint(
PALIMPORT
+DWORD
+PALAPI
+PAL_PublishDacTableAddress(
+ IN PVOID address,
+ IN ULONG size
+ );
+
+PALIMPORT
+DWORD
+PALAPI
+PAL_GetDacTableAddress(
+ IN DWORD pid,
+ OUT PVOID *pAddress,
+ OUT PULONG pSize
+ );
+
+PALIMPORT
+VOID
+PALAPI
+PAL_CleanupDacTableAddress(
+ );
+
+
+PALIMPORT
BOOL
PALAPI
PAL_RegisterMacEHPort();
diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt
index 721bbba4a9..d65233ed17 100644
--- a/src/pal/src/CMakeLists.txt
+++ b/src/pal/src/CMakeLists.txt
@@ -89,6 +89,7 @@ set(SOURCES
misc/fmtmessage.cpp
misc/interlock.cpp
misc/miscpalapi.cpp
+ misc/dactableaddress.cpp
misc/strutil.cpp
misc/sysinfo.cpp
misc/time.cpp
diff --git a/src/pal/src/misc/dactableaddress.cpp b/src/pal/src/misc/dactableaddress.cpp
new file mode 100644
index 0000000000..43ef7d68ed
--- /dev/null
+++ b/src/pal/src/misc/dactableaddress.cpp
@@ -0,0 +1,163 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+/*++
+
+
+
+Module Name:
+
+ dactableaddress.cpp
+
+Abstract:
+
+ Functions to write and read DAC global pointer table address between the coreclr
+ and DAC/debugger processes.
+
+NOTE:
+
+ These functions are temporary until a better way to plumb the DAC table
+ address from the debuggee to debugger processes is implemented.
+
+Revision History:
+
+
+--*/
+
+#include "pal/palinternal.h"
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdio.h>
+
+/*++
+Function
+ PAL_PublishDacTableAddress
+
+Parameters
+
+ address
+ [in] address of dac table
+ size
+ [in] size of dac table
+
+Return Values
+ pal errors
+
+--*/
+PALIMPORT
+DWORD
+PALAPI
+PAL_PublishDacTableAddress(
+ IN PVOID address,
+ IN ULONG size)
+{
+ DWORD ret = NO_ERROR;
+
+ // TODO - 3/5/15 - the DAC side needs the debuggee pid
+ // pid_t pid = getpid();
+ pid_t pid = 0;
+ char fileName[100];
+ snprintf(fileName, sizeof(fileName), "/tmp/%d_dacTable", pid);
+
+ FILE *file = fopen(fileName, "w+");
+ if (file != nullptr)
+ {
+ char dacTableAddress[100];
+ snprintf(dacTableAddress, sizeof(dacTableAddress), "%p %d\n", address, size);
+
+ if (fputs(dacTableAddress, file) < 0)
+ {
+ ret = ERROR_INVALID_DATA;
+ }
+
+ fclose(file);
+ }
+ else
+ {
+ ret = ERROR_FILE_NOT_FOUND;
+ }
+
+ return ret;
+}
+
+
+/*++
+Function
+ PAL_GetDacTableAddress
+
+Parameters
+
+ pid
+ [in] process id to get the data
+ pAddress
+ [out] pointer to put DAC table address
+ pSize
+ [out] pointer to put DAC table size
+
+Return Values
+ pal errors
+
+--*/
+PALIMPORT
+DWORD
+PALAPI
+PAL_GetDacTableAddress(
+ IN DWORD pid,
+ OUT PVOID *pAddress,
+ OUT PULONG pSize)
+{
+ DWORD ret = NO_ERROR;
+
+ char fileName[100];
+ snprintf(fileName, sizeof(fileName), "/tmp/%d_dacTable", pid);
+
+ FILE *file = fopen(fileName, "r");
+ if (file != nullptr)
+ {
+ char data[100];
+ if (fgets(data, sizeof(data), file) != nullptr)
+ {
+ if (sscanf(data, "%p %d\n", pAddress, pSize) != 2)
+ {
+ ret = ERROR_INVALID_DATA;
+ }
+ }
+ else
+ {
+ ret = ERROR_INVALID_DATA;
+ }
+
+ fclose(file);
+ }
+ else
+ {
+ ret = ERROR_FILE_NOT_FOUND;
+ }
+ return ret;
+}
+
+/*++
+Function
+ PAL_CleanupDacTableAddress
+
+Parameters
+ None
+
+Return Values
+ None
+
+--*/
+PALIMPORT
+VOID
+PALAPI
+PAL_CleanupDacTableAddress()
+{
+ //pid_t pid = getpid();
+ pid_t pid = 0;
+ char fileName[100];
+ snprintf(fileName, sizeof(fileName), "/tmp/%d_dacTable", pid);
+
+ remove(fileName);
+}
diff --git a/src/unwinder/dac/hostwinamd64/CMakeLists.txt b/src/unwinder/dac/hostwinamd64/CMakeLists.txt
index 66a595f033..757fde3909 100644
--- a/src/unwinder/dac/hostwinamd64/CMakeLists.txt
+++ b/src/unwinder/dac/hostwinamd64/CMakeLists.txt
@@ -1,5 +1,3 @@
-remove_definitions(-DPROFILING_SUPPORTED)
-add_definitions(-DPROFILING_SUPPORTED_DATA)
-add_definitions(-DDACCESS_COMPILE)
+include(${CLR_DIR}/dac.cmake)
add_library(unwinder_dac_amd64 ${UNWINDER_SOURCES})
diff --git a/src/vm/appdomain.hpp b/src/vm/appdomain.hpp
index 24c86e9ae4..0e966659bb 100644
--- a/src/vm/appdomain.hpp
+++ b/src/vm/appdomain.hpp
@@ -5162,8 +5162,7 @@ typedef VPTR(class SharedDomain) PTR_SharedDomain;
class SharedDomain : public BaseDomain
{
-
- VPTR_VTABLE_CLASS(SharedDomain, BaseDomain)
+ VPTR_VTABLE_CLASS_AND_CTOR(SharedDomain, BaseDomain)
public:
diff --git a/src/vm/ceemain.h b/src/vm/ceemain.h
index e4f70057b9..9a6a54fbb3 100644
--- a/src/vm/ceemain.h
+++ b/src/vm/ceemain.h
@@ -57,6 +57,8 @@ void InnerCoEEShutDownCOM();
// how the g_pCEE and related variables are initialized.
class CExecutionEngine : public IExecutionEngine, public IEEMemoryManager
{
+ friend struct _DacGlobals;
+
//***************************************************************************
// public API:
//***************************************************************************
diff --git a/src/vm/codeman.h b/src/vm/codeman.h
index e7ba84b862..a28c556dfd 100644
--- a/src/vm/codeman.h
+++ b/src/vm/codeman.h
@@ -390,10 +390,7 @@ class CodeHeap
VPTR_BASE_VTABLE_CLASS(CodeHeap)
public:
-
-#ifdef DACCESS_COMPILE
CodeHeap() {}
-#endif
// virtual dtor. Clean up heap
virtual ~CodeHeap() {}
@@ -1143,6 +1140,7 @@ public:
class ExecutionManager
{
friend class CorExternalDataAccess;
+ friend struct _DacGlobals;
#ifdef DACCESS_COMPILE
friend class ClrDataAccess;
@@ -1282,7 +1280,7 @@ public:
LoaderAllocator *pLoaderAllocator = NULL);
#endif
-private :
+private:
static RangeSection * FindCodeRangeWithLock(PCODE currentPC);
static BOOL IsManagedCodeWithLock(PCODE currentPC);
diff --git a/src/vm/crst.h b/src/vm/crst.h
index da50066ccc..010cb5f8fb 100644
--- a/src/vm/crst.h
+++ b/src/vm/crst.h
@@ -473,11 +473,12 @@ public:
LIMITED_METHOD_CONTRACT;
};
+#endif
+
Crst() {
LIMITED_METHOD_CONTRACT;
}
-#endif
#endif // CLR_STANDALONE_BINDER
};
diff --git a/src/vm/dbginterface.h b/src/vm/dbginterface.h
index fb3e167374..4d55f74e02 100644
--- a/src/vm/dbginterface.h
+++ b/src/vm/dbginterface.h
@@ -28,7 +28,7 @@ typedef void (*FAVORCALLBACK)(void *);
class DebugInterface
{
- VPTR_BASE_VTABLE_CLASS(DebugInterface);
+ VPTR_BASE_VTABLE_CLASS_AND_CTOR(DebugInterface);
public:
diff --git a/src/vm/eedbginterface.h b/src/vm/eedbginterface.h
index f300a0f665..e6678a8861 100644
--- a/src/vm/eedbginterface.h
+++ b/src/vm/eedbginterface.h
@@ -63,7 +63,7 @@ struct DebugOffsetToHandlerInfo
class EEDebugInterface
{
- VPTR_BASE_VTABLE_CLASS(EEDebugInterface);
+ VPTR_BASE_VTABLE_CLASS_AND_CTOR(EEDebugInterface);
public:
diff --git a/src/vm/eedbginterfaceimpl.h b/src/vm/eedbginterfaceimpl.h
index 5b59f897d0..f743dd02c1 100644
--- a/src/vm/eedbginterfaceimpl.h
+++ b/src/vm/eedbginterfaceimpl.h
@@ -36,7 +36,7 @@
class EEDbgInterfaceImpl : public EEDebugInterface
{
- VPTR_VTABLE_CLASS(EEDbgInterfaceImpl, EEDebugInterface);
+ VPTR_VTABLE_CLASS_AND_CTOR(EEDbgInterfaceImpl, EEDebugInterface);
public:
@@ -48,7 +48,7 @@ public:
static FORCEINLINE void Init(void)
{
g_pEEDbgInterfaceImpl = new EEDbgInterfaceImpl(); // new throws on failure
- }
+ }
//
// Cleanup any global data used by this interface.
diff --git a/src/vm/object.h b/src/vm/object.h
index 4930944c96..2669a54b2a 100644
--- a/src/vm/object.h
+++ b/src/vm/object.h
@@ -747,6 +747,7 @@ class ArrayBase : public Object
friend OBJECTREF FastAllocatePrimitiveArray(MethodTable* arrayType, DWORD cElements, BOOL bAllocateInLargeHeap);
friend class JIT_TrialAlloc;
friend class CheckAsmOffsets;
+ friend struct _DacGlobals;
private:
// This MUST be the first field, so that it directly follows Object. This is because
diff --git a/src/vm/pefile.h b/src/vm/pefile.h
index a62ba774c8..8f8a5f3588 100644
--- a/src/vm/pefile.h
+++ b/src/vm/pefile.h
@@ -108,7 +108,6 @@ class PEFile
// ------------------------------------------------------------
// SOS support
// ------------------------------------------------------------
-
VPTR_BASE_CONCRETE_VTABLE_CLASS(PEFile)
public:
diff --git a/src/vm/rcwwalker.h b/src/vm/rcwwalker.h
index a2272eafbb..2497b8c2f8 100644
--- a/src/vm/rcwwalker.h
+++ b/src/vm/rcwwalker.h
@@ -32,6 +32,8 @@
//
class RCWWalker
{
+ friend struct _DacGlobals;
+
private :
static VolatilePtr<IJupiterGCManager> s_pGCManager; // The one and only GCManager instance
static BOOL s_bGCStarted; // Has GC started?
diff --git a/src/vm/security.h b/src/vm/security.h
index 2b9e63c06d..9331a6820a 100644
--- a/src/vm/security.h
+++ b/src/vm/security.h
@@ -246,7 +246,9 @@ namespace Security
class ISecurityDescriptor
{
public:
+#ifndef FEATURE_PAL
VPTR_BASE_VTABLE_CLASS(ISecurityDescriptor)
+#endif
virtual ~ISecurityDescriptor() { LIMITED_METHOD_CONTRACT; }
virtual BOOL IsFullyTrusted() = 0;
@@ -274,7 +276,9 @@ public:
class IApplicationSecurityDescriptor : public ISecurityDescriptor
{
public:
+#ifndef FEATURE_PAL
VPTR_ABSTRACT_VTABLE_CLASS(IApplicationSecurityDescriptor, ISecurityDescriptor)
+#endif
#ifndef DACCESS_COMPILE
public:
@@ -318,7 +322,9 @@ public:
class IAssemblySecurityDescriptor : public ISecurityDescriptor
{
public:
+#ifndef FEATURE_PAL
VPTR_ABSTRACT_VTABLE_CLASS(IAssemblySecurityDescriptor, ISecurityDescriptor)
+#endif
#ifndef DACCESS_COMPILE
virtual SharedSecurityDescriptor *GetSharedSecDesc() = 0;
diff --git a/src/vm/securitydescriptor.h b/src/vm/securitydescriptor.h
index 22aecf5dd8..5d52f0494b 100644
--- a/src/vm/securitydescriptor.h
+++ b/src/vm/securitydescriptor.h
@@ -139,7 +139,9 @@ template<typename IT>
class SecurityDescriptorBase : public IT, public SecurityDescriptor
{
public:
+#ifndef FEATURE_PAL
VPTR_ABSTRACT_VTABLE_CLASS(SecurityDescriptorBase, IT) // needed for the DAC
+#endif
inline SecurityDescriptorBase(AppDomain *pAppDomain, DomainAssembly *pAssembly, PEFile* pPEFile, LoaderAllocator *pLoaderAllocator);
diff --git a/src/vm/securitydescriptorappdomain.h b/src/vm/securitydescriptorappdomain.h
index d39cf0e3a9..6deab32c2d 100644
--- a/src/vm/securitydescriptorappdomain.h
+++ b/src/vm/securitydescriptorappdomain.h
@@ -36,7 +36,9 @@
class ApplicationSecurityDescriptor : public SecurityDescriptorBase<IApplicationSecurityDescriptor>
{
public:
+#ifndef FEATURE_PAL
VPTR_VTABLE_CLASS(ApplicationSecurityDescriptor, SecurityDescriptorBase<IApplicationSecurityDescriptor>)
+#endif
private:
// Dependency in managed : System.Security.HostSecurityManager.cs
diff --git a/src/vm/securitydescriptorassembly.h b/src/vm/securitydescriptorassembly.h
index 306ac24517..3687538a06 100644
--- a/src/vm/securitydescriptorassembly.h
+++ b/src/vm/securitydescriptorassembly.h
@@ -57,7 +57,9 @@ void StoreObjectInLazyHandle(LOADERHANDLE& handle, OBJECTREF ref, LoaderAllocato
class AssemblySecurityDescriptor : public SecurityDescriptorBase<IAssemblySecurityDescriptor>
{
public:
+#ifndef FEATURE_PAL
VPTR_VTABLE_CLASS(AssemblySecurityDescriptor, SecurityDescriptorBase<IAssemblySecurityDescriptor>)
+#endif
private:
PsetCacheEntry* m_arrPassedLinktimeDemands[MAX_PASSED_DEMANDS];
diff --git a/src/vm/simplerwlock.hpp b/src/vm/simplerwlock.hpp
index 4566bcd4d1..6363d60884 100644
--- a/src/vm/simplerwlock.hpp
+++ b/src/vm/simplerwlock.hpp
@@ -163,7 +163,6 @@ public:
#endif
}
-#ifdef DACCESS_COMPILE
// Special empty CTOR for DAC. We still need to assign to const fields, but they won't actually be used.
SimpleRWLock()
: m_gcMode(COOPERATIVE_OR_PREEMPTIVE)
@@ -174,7 +173,6 @@ public:
m_countNoTriggerGC = 0;
#endif //_DEBUG
}
-#endif
#ifndef DACCESS_COMPILE
// Acquire the reader lock.
diff --git a/src/vm/stackwalktypes.h b/src/vm/stackwalktypes.h
index f2be145c81..89829a85dc 100644
--- a/src/vm/stackwalktypes.h
+++ b/src/vm/stackwalktypes.h
@@ -199,6 +199,8 @@ static_assert_no_msg(sizeof(StackwalkCacheEntry) == 2 * sizeof(UINT_PTR));
class StackwalkCache
{
+ friend struct _DacGlobals;
+
public:
BOOL Lookup(UINT_PTR IP);
void Insert(StackwalkCacheEntry *pCacheEntry);
diff --git a/src/vm/stubmgr.h b/src/vm/stubmgr.h
index 70405ddf50..00743e2b14 100644
--- a/src/vm/stubmgr.h
+++ b/src/vm/stubmgr.h
@@ -194,6 +194,7 @@ typedef VPTR(class StubManager) PTR_StubManager;
class StubManager
{
friend class StubManagerIterator;
+
VPTR_BASE_VTABLE_CLASS(StubManager)
public:
@@ -319,7 +320,7 @@ public:
// This is used by DAC to provide more information on who owns a stub.
virtual LPCWSTR GetStubManagerName(PCODE addr) = 0;
#endif
-
+
private:
SPTR_DECL(StubManager, g_pFirstManager);
PTR_StubManager m_pNextManager;
diff --git a/src/vm/win32threadpool.h b/src/vm/win32threadpool.h
index 20d2412c18..22fd6e05b4 100644
--- a/src/vm/win32threadpool.h
+++ b/src/vm/win32threadpool.h
@@ -104,7 +104,7 @@ class ThreadpoolMgr
friend class ManagedPerAppDomainTPCount;
friend class PerAppDomainTPCountList;
friend class HillClimbing;
-
+ friend struct _DacGlobals;
//
// UnfairSemaphore is a more scalable semaphore than CLRSemaphore. It prefers to release threads that have more recently begun waiting,
@@ -1291,8 +1291,8 @@ private:
static LONG Initialization; // indicator of whether the threadpool is initialized.
- SVAL_DECL(LONG,MinLimitTotalWorkerThreads); // same as MinLimitTotalCPThreads
- SVAL_DECL(LONG,MaxLimitTotalWorkerThreads); // same as MaxLimitTotalCPThreads
+ SVAL_DECL(LONG,MinLimitTotalWorkerThreads); // same as MinLimitTotalCPThreads
+ SVAL_DECL(LONG,MaxLimitTotalWorkerThreads); // same as MaxLimitTotalCPThreads
static Volatile<unsigned int> LastDequeueTime; // used to determine if work items are getting thread starved
@@ -1306,12 +1306,10 @@ private:
static int ThreadAdjustmentInterval;
- private:
-
SPTR_DECL(WorkRequest,WorkRequestHead); // Head of work request queue
SPTR_DECL(WorkRequest,WorkRequestTail); // Head of work request queue
- static unsigned int LastCPThreadCreation; // last time a completion port thread was created
+ static unsigned int LastCPThreadCreation; // last time a completion port thread was created
static unsigned int NumberOfProcessors; // = NumberOfWorkerThreads - no. of blocked threads
static BOOL IsApcPendingOnWaitThread; // Indicates if an APC is pending on the wait thread
@@ -1323,9 +1321,8 @@ public:
static CrstStatic WorkerCriticalSection;
private:
-
static const DWORD WorkerTimeout = 20 * 1000;
- static const DWORD WorkerTimeoutAppX = 5 * 1000; // shorter timeout to allow threads to exit prior to app suspension
+ static const DWORD WorkerTimeoutAppX = 5 * 1000; // shorter timeout to allow threads to exit prior to app suspension
SVAL_DECL(ThreadCounter,WorkerCounter);
@@ -1361,10 +1358,10 @@ private:
static BOOL InitCompletionPortThreadpool; // flag indicating whether completion port threadpool has been initialized
static HANDLE GlobalCompletionPort; // used for binding io completions on file handles
- public:
+public:
SVAL_DECL(ThreadCounter,CPThreadCounter);
- private:
+private:
SVAL_DECL(LONG,MaxLimitTotalCPThreads); // = MaxLimitCPThreadsPerCPU * number of CPUS
SVAL_DECL(LONG,MinLimitTotalCPThreads);
SVAL_DECL(LONG,MaxFreeCPThreads); // = MaxFreeCPThreadsPerCPU * Number of CPUS