-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Adding TraverseModuleMap cDAC API #118650
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
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
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
This PR implements the TraverseModuleMap API for the contract-based Data Access Component (cDAC) system. The implementation allows traversal of module lookup maps for debugging purposes, specifically supporting iteration over TypeDef-to-MethodTable and TypeRef-to-MethodTable mappings within modules.
Key changes:
- Replaces the stub implementation of
TraverseModuleMap
with a full cDAC-based implementation - Adds a new
IterateModuleLookupMap
method to the Loader contract for iterating over module lookup maps - Introduces a
ModuleMapType
enum to distinguish between different map types
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
SOSDacImpl.cs |
Implements the main TraverseModuleMap method with cDAC contracts and legacy comparison logic |
ISOSDacInterface.cs |
Adds ModuleMapType enum defining supported map types |
Loader_1.cs |
Implements the core IterateModuleLookupMap method for traversing lookup maps |
ILoader.cs |
Adds the IterateModuleLookupMap method signature to the contract interface |
Loader.md |
Updates documentation with the new API method and implementation details |
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.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
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
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.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.
Looked good to me (it looked like the refactoring and test suggestions were going in a good direction)
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
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ISOSDacInterface.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ISOSDacInterface.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.
looks good if you add a comment showing that the ulong
represents a ClrDataAddress
…nterface.cs Co-authored-by: Max Charlamb <[email protected]>
This will cause dumpmodule -mt to print twice in debug, shouldn't break the tests