-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Use module as ID for debugger module cache instead of domain assembly #118414
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
Use module as ID for debugger module cache instead of domain assembly #118414
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
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)
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
noahfalk
left a comment
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.
LGTM 👍
|
/ba-g Failures are unrelated |
|
/ba-g Failures are unrelated |
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.