Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wrighton <davidwr@microsoft.com>2017-04-29 02:21:51 +0300
committerDavid Wrighton <davidwr@microsoft.com>2017-04-29 02:21:51 +0300
commit790ea4e6b76986997cbcc8e12f6e66dbee86eaeb (patch)
treed6612093377ffebf50bade900635ca08bb389b8b /src/Native/Runtime/RuntimeInstance.cpp
parentd86dbc384ca8ae34245bdca97d59a144bc8e2548 (diff)
Enhance debugging support for existing .NET Native managed debugger
- Change eetype node name to end with ::`vftable' to improve debuggability in windbg - Change node name of statics nodes to be composed from mangled type name + a suffix. This makes it possible to find these statics blocks through msdia api surface. Will need work with debugger symbol generation to provide individual static field lookup - Send debugger events on module load for TypeManager based modules [tfs-changeset: 1656557]
Diffstat (limited to 'src/Native/Runtime/RuntimeInstance.cpp')
-rw-r--r--src/Native/Runtime/RuntimeInstance.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/Native/Runtime/RuntimeInstance.cpp b/src/Native/Runtime/RuntimeInstance.cpp
index 0151128d9..7958a7a1d 100644
--- a/src/Native/Runtime/RuntimeInstance.cpp
+++ b/src/Native/Runtime/RuntimeInstance.cpp
@@ -257,6 +257,16 @@ void RuntimeInstance::EnumAllStaticGCRefs(void * pfnCallback, void * pvCallbackD
EnumThreadStaticGCRefDescs(pfnCallback, pvCallbackData);
}
+RuntimeInstance::OsModuleList* RuntimeInstance::GetOsModuleList()
+{
+ return dac_cast<DPTR(OsModuleList)>(dac_cast<TADDR>(this) + offsetof(RuntimeInstance, m_OsModuleList));
+}
+
+ReaderWriterLock& RuntimeInstance::GetTypeManagerLock()
+{
+ return m_ModuleListLock;
+}
+
#ifndef DACCESS_COMPILE
Module * RuntimeInstance::FindModuleByOsHandle(HANDLE hOsHandle)
@@ -433,6 +443,11 @@ COOP_PINVOKE_HELPER(TypeManagerHandle, RhpCreateTypeManager, (HANDLE osModule, v
{
TypeManager * typeManager = TypeManager::Create(osModule, pModuleHeader, pClasslibFunctions, nClasslibFunctions);
GetRuntimeInstance()->RegisterTypeManager(typeManager);
+
+ // This event must occur after the module is added to the enumeration
+ if (osModule != nullptr)
+ DebugEventSource::SendModuleLoadEvent(osModule);
+
return TypeManagerHandle::Create(typeManager);
}
@@ -453,7 +468,7 @@ COOP_PINVOKE_HELPER(void*, RhpRegisterOsModule, (HANDLE hOsModule))
RuntimeInstance *pRuntimeInstance = GetRuntimeInstance();
ReaderWriterLock::WriteHolder write(&pRuntimeInstance->GetTypeManagerLock());
- pRuntimeInstance->GetOsModuleList().PushHead(pEntry);
+ pRuntimeInstance->GetOsModuleList()->PushHead(pEntry);
}
return hOsModule; // Return non-null on success
@@ -464,16 +479,6 @@ RuntimeInstance::TypeManagerList& RuntimeInstance::GetTypeManagerList()
return m_TypeManagerList;
}
-RuntimeInstance::OsModuleList& RuntimeInstance::GetOsModuleList()
-{
- return m_OsModuleList;
-}
-
-ReaderWriterLock& RuntimeInstance::GetTypeManagerLock()
-{
- return m_ModuleListLock;
-}
-
// static
RuntimeInstance * RuntimeInstance::Create(HANDLE hPalInstance)
{