-
Notifications
You must be signed in to change notification settings - Fork 5.2k
GetAssemblyModuleList cDAC implementation #117452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds the cDAC implementation for GetAssemblyModuleList
and extends the loader contracts to support fetching a module pointer from an assembly reference.
- Implements
ISOSDacInterface.GetAssemblyModuleList
inSOSDacImpl.cs
with argument validation, loader dispatch, HRESULT mapping, and debug-time consistency checks against the legacy DAC. - Introduces a new
GetModulePointer
method on theILoader
interface (abstraction and contract) and provides its implementation inLoader_1.cs
. - Updates interface definitions in
ILoader.cs
to include the new API.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs | Full implementation of GetAssemblyModuleList , including error handling and DEBUG assertions |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs | Implements ILoader.GetModulePointer , throwing on null or missing module |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ILoader.cs | Adds default interface method GetModulePointer to the loader abstraction |
Comments suppressed due to low confidence (2)
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs:228
- Add unit tests for GetAssemblyModuleList covering edge cases (null/zero assembly, zero count, and assemblies with multiple modules) to validate the new implementation.
int ISOSDacInterface.GetAssemblyModuleList(ClrDataAddress assembly, uint count, [In, MarshalUsing(CountElementName = "count"), Out] ClrDataAddress[] modules, uint* pNeeded)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ILoader.cs:80
- [nitpick] The new GetModulePointer interface method lacks XML doc comments. Consider adding a summary and parameter/return descriptions to maintain documentation consistency.
TargetPointer GetModulePointer(TargetPointer assemblyPointer) => throw new NotImplementedException();
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
...tive/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ILoader.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
...tive/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ILoader.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs
Outdated
Show resolved
Hide resolved
...tive/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ILoader.cs
Outdated
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes lgtm 👍
After the runtime-diagnostics pipeline passes lets merge this.
Adding the implementation of the GetAssemblyModuleList API to the cDAC