提交 46cf20ed 编写于 作者: C Charles Stoner

Update comment from b60a2b93

上级 fc80ae9a
...@@ -21,6 +21,7 @@ internal static class DkmUtilities ...@@ -21,6 +21,7 @@ internal static class DkmUtilities
internal unsafe delegate IntPtr GetMetadataBytesPtrFunction(AssemblyIdentity assemblyIdentity, out uint uSize); internal unsafe delegate IntPtr GetMetadataBytesPtrFunction(AssemblyIdentity assemblyIdentity, out uint uSize);
// Return the set of managed module instances from the AppDomain.
private static IEnumerable<DkmClrModuleInstance> GetModulesInAppDomain(this DkmClrRuntimeInstance runtime, DkmClrAppDomain appDomain) private static IEnumerable<DkmClrModuleInstance> GetModulesInAppDomain(this DkmClrRuntimeInstance runtime, DkmClrAppDomain appDomain)
{ {
if (appDomain.IsUnloaded) if (appDomain.IsUnloaded)
...@@ -29,11 +30,11 @@ private static IEnumerable<DkmClrModuleInstance> GetModulesInAppDomain(this DkmC ...@@ -29,11 +30,11 @@ private static IEnumerable<DkmClrModuleInstance> GetModulesInAppDomain(this DkmC
} }
var appDomainId = appDomain.Id; var appDomainId = appDomain.Id;
// GetModuleInstances() may include instances of DkmClrNcContainerModuleInstance
// which are containers of managed module instances (see GetEmbeddedModules())
// but not managed modules themselves. Since GetModuleInstances() will include the
// embedded modules, we can simply ignore DkmClrNcContainerModuleInstances.
return runtime.GetModuleInstances(). return runtime.GetModuleInstances().
// Ignore module instances that are not DkmClrModuleInstance.
// Specifically, ignore DkmClrNcContainerModuleInstance.
// (The embedded DkmClrNcModuleInstance modules will
// be included in GetModuleInstances and will be used.)
OfType<DkmClrModuleInstance>(). OfType<DkmClrModuleInstance>().
Where(module => Where(module =>
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册