Use module as ID for debugger module cache instead of domain assembly#118414
Merged
tommcdon merged 2 commits intodotnet:mainfrom Aug 6, 2025
Merged
Use module as ID for debugger module cache instead of domain assembly#118414tommcdon merged 2 commits intodotnet:mainfrom
tommcdon merged 2 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes a debugger module cache inconsistency where ICorDebugClass.GetModule returned a different ICorDebugModule instance compared to the one received via ICorDebugManagedCallback::LoadModule. The fix changes the debugger's module caching strategy to consistently use the module pointer as the cache key instead of sometimes using the domain assembly pointer.
Key changes:
- Standardizes module cache lookups to always use the module pointer as the key
- Ensures module pointer is resolved early when only domain assembly is available
- Updates the CordbModule constructor to use module pointer for its base identifier
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/coreclr/debug/di/rsappdomain.cpp | Updates module cache lookup to use module pointer consistently and resolves module pointer early |
| src/coreclr/debug/di/process.cpp | Changes class lookup to resolve and use module pointer instead of domain assembly for cache access |
| src/coreclr/debug/di/module.cpp | Updates CordbModule constructor to use module pointer for base class identifier |
Comments suppressed due to low confidence (1)
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
hoyosjs
approved these changes
Aug 5, 2025
hoyosjs
approved these changes
Aug 5, 2025
noahfalk
reviewed
Aug 5, 2025
Member
Author
|
/ba-g Failures are unrelated |
Member
Author
|
/ba-g Failures are unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses an issue caused by #117224 found during Visual Studio debugger testing, where ICorDebugClass.GetModule returns a different instance of ICorDebugModule compared to the instance received via ICorDebugManagedCallback::LoadModule.