Skip to content

Conversation

rcj1
Copy link
Contributor

@rcj1 rcj1 commented Aug 12, 2025

This will cause dumpmodule -mt to print twice in debug, shouldn't break the tests

@Copilot Copilot AI review requested due to automatic review settings August 12, 2025 18:27
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

@Copilot Copilot AI left a 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

Copy link
Member

@noahfalk noahfalk left a 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)

Copy link
Member

@max-charlamb max-charlamb left a 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

@rcj1 rcj1 merged commit 5a6dcb8 into dotnet:main Aug 25, 2025
47 of 49 checks passed
@rcj1 rcj1 deleted the TraverseModuleMap branch August 25, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants