Replace EnumerateModulesInAssembly with combined GetModuleForAssembly; implement in cDAC#128294
Open
Copilot wants to merge 5 commits into
Open
Replace EnumerateModulesInAssembly with combined GetModuleForAssembly; implement in cDAC#128294Copilot wants to merge 5 commits into
Copilot wants to merge 5 commits into
Conversation
Co-authored-by: rcj1 <[email protected]>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the DAC/DBI module-per-assembly query by folding the “is loaded” check into IDacDbiInterface::GetModuleForAssembly, removing the now-dead EnumerateModulesInAssembly callback API, and implementing the updated APIs in the cDAC (Microsoft.Diagnostics.DataContractReader.Legacy) along with updating dump-based tests.
Changes:
- Extends
GetModuleForAssemblyto optionally return an “is module loaded” flag and removesEnumerateModulesInAssemblyfrom the DAC/DBI contract. - Updates right-side (RS) codepaths that prepopulate/enumerate modules to use the combined API.
- Implements the updated interface in cDAC and updates dump tests to validate the new signature/behavior.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/tests/DumpTests/DacDbi/DacDbiLoaderDumpTests.cs | Updates dump tests to call the new GetModuleForAssembly signature and validate the loaded flag on success. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Updates the managed COM projection to match the new vtable shape and removes the module-enumeration entry. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements the new GetModuleForAssembly (with loaded flag) and implements GetAssemblyFromModule in cDAC; removes legacy fallback for module enumeration. |
| src/coreclr/inc/dacdbi.idl | Updates the IDL contract: changes GetModuleForAssembly signature and removes EnumerateModulesInAssembly / its callback typedef. |
| src/coreclr/debug/inc/dacdbiinterface.h | Updates the native interface definition and removes the module enumeration API documentation/signature. |
| src/coreclr/debug/di/rspriv.h | Removes the RS module-enumeration callback declaration. |
| src/coreclr/debug/di/rsappdomain.cpp | Switches prepopulation logic to call GetModuleForAssembly and gate cache population on the loaded flag. |
| src/coreclr/debug/di/process.cpp | Rewrites shim module enumeration to use the combined GetModuleForAssembly + loaded flag logic. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Updates the DAC implementation class declaration to the new GetModuleForAssembly signature and removes module enumeration. |
| src/coreclr/debug/daccess/dacdbiimpl.cpp | Implements the updated GetModuleForAssembly signature and removes the module enumeration implementation. |
Copilot's findings
- Files reviewed: 10/10 changed files
- Comments generated: 3
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: rcj1 <[email protected]>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.