How microsoft/clrmd works
ClrMD is a .NET process and crash-dump introspection library for diagnostic tools and debugger plugins. Its principal workflow is to open a process or dump, identify a CLR, create a runtime, then inspect managed heap and runtime state. The graph also preserves the DbgEng integration and native-heap inspection capabilities visible in the tree and README. Several runtime internals are represented from the source index; links not established by the excerpts are omitted or marked unverified.
Main entry points: ClrRuntime.cs CLR Runtime · ExtensionContext.cs DbgEng Extension · DataTarget.cs Data Target · ClrInfo.cs CLR Discovery
Components 16
Target Access
- Data Target
src/Microsoft.Diagnostics.Runtime/DataTarget.cs - Data Readers
src/Microsoft.Diagnostics.Runtime/DataReaders/IDataReader.cs
Runtime Discovery
- CLR Discovery
src/Microsoft.Diagnostics.Runtime/ClrInfo.cs - DAC Loading
src/Microsoft.Diagnostics.Runtime/DacLibrary.cs - DAC Services
src/Microsoft.Diagnostics.Runtime/DacImplementation/DacServiceProvider.cs - CLR Runtime
src/Microsoft.Diagnostics.Runtime/ClrRuntime.cs
Runtime Inspection
- Managed Heap
src/Microsoft.Diagnostics.Runtime/ClrHeap.cs - Objects and Types
src/Microsoft.Diagnostics.Runtime/ClrObject.cs - Threads and Stacks
src/Microsoft.Diagnostics.Runtime/ClrThread.cs - Modules
src/Microsoft.Diagnostics.Runtime/ModuleInfo.cs - Native Heaps
src/Microsoft.Diagnostics.Runtime/ClrNativeHeapInfo.cs - JIT Managers
src/Microsoft.Diagnostics.Runtime/ClrJitManager.cs
Debugger Integration
- DbgEng Extension
src/Microsoft.Diagnostics.Runtime.Utilities/DbgEng/ExtensionContext.cs - DbgEng Reader
src/Microsoft.Diagnostics.Runtime.Utilities/DbgEng/DbgEngIDataReader.cs - DbgEng Client
src/Microsoft.Diagnostics.Runtime/DbgEng/DebugClient.cs
Other components
- Diagnostic Tool
Connections 14
- Diagnostic Tool → Data Target: opens process or dump
README.md - Data Target → Data Readers: reads target memory
src/Microsoft.Diagnostics.Runtime/DataTarget.cs - CLR Discovery → CLR Runtime: creates runtime
src/Microsoft.Diagnostics.Runtime/ClrInfo.cs - CLR Runtime → DAC Services: requests services
src/Microsoft.Diagnostics.Runtime/ClrRuntime.cs - DAC Services → DAC Loading: uses DAC
src/Microsoft.Diagnostics.Runtime/DacImplementation/DacServiceProvider.cs - CLR Runtime → Managed Heap: creates heap
src/Microsoft.Diagnostics.Runtime/ClrRuntime.cs - Managed Heap → Objects and Types: enumerates objects
src/Microsoft.Diagnostics.Runtime/ClrObject.cs - CLR Runtime → Threads and Stacks: exposes threads
src/Microsoft.Diagnostics.Runtime/ClrRuntime.cs - CLR Runtime → Native Heaps: enumerates heaps
src/Microsoft.Diagnostics.Runtime/ClrRuntime.cs - CLR Runtime → JIT Managers: enumerates managers
src/Microsoft.Diagnostics.Runtime/ClrRuntime.cs - JIT Managers → Native Heaps: enumerates JIT heaps
src/Microsoft.Diagnostics.Runtime/ClrJitManager.cs - DbgEng Extension → DbgEng Reader: creates data target
src/Microsoft.Diagnostics.Runtime.Utilities/DbgEng/ExtensionContext.cs - DbgEng Reader → DbgEng Client: uses debugger APIs
src/Microsoft.Diagnostics.Runtime.Utilities/DbgEng/DbgEngIDataReader.cs - DbgEng Extension → CLR Discovery: creates runtimes
src/Microsoft.Diagnostics.Runtime.Utilities/DbgEng/ExtensionContext.cs