[cDAC] Implementing cDAC DacDbi API methods EnumerateMethodDescParams and EnumerateTypeHandleParams #128517
Open
Copilot wants to merge 4 commits into
Open
[cDAC] Implementing cDAC DacDbi API methods EnumerateMethodDescParams and EnumerateTypeHandleParams #128517Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
…rameterized DacDbiArray allocator Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DAC/DBI type-parameter retrieval APIs to use callback-based enumeration instead of returning allocated TypeParamsList buffers, and wires up the necessary supporting infrastructure on both the native (DAC/DBI + RS) and managed cDAC sides.
Changes:
- Replace
GetMethodDescParams/GetTypeHandleParamswithEnumerateMethodDescParams/EnumerateTypeHandleParamsacross the native interface, DAC implementation, and RS call sites (using a newCallbackAccumulatoradapter). - Implement the new enumeration APIs in managed cDAC (
DacDbiImpl), including generic-token resolution logic andSystem.__Canonfallback for per-parameter failures. - Add a new cDAC global (
CanonMethodTable) and bump the DAC/DBI protocol breaking-change counter.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Updates managed COM interface signatures to the new callback-based enumeration methods. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements enumeration logic in cDAC and adds helper logic for parent matching and __Canon fallback. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Constants.cs | Adds Globals.CanonMethodTable to enable managed cDAC to resolve System.__Canon. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IRuntimeTypeSystem.cs | Minor formatting change (no functional contract API change). |
| src/coreclr/vm/datadescriptor/datadescriptor.inc | Publishes the CanonMethodTable global pointer for cDAC readers. |
| src/coreclr/debug/inc/dacdbistructures.h | Bumps kCurrentDacDbiProtocolBreakingChangeCounter to reflect the breaking interface change. |
| src/coreclr/debug/inc/dacdbiinterface.h | Introduces FP_TYPEPARAM_CALLBACK and replaces the two APIs with enumeration-based equivalents. |
| src/coreclr/debug/di/rstype.cpp | Updates RS type instantiation to use enumeration + accumulator instead of TypeParamsList returned from DAC. |
| src/coreclr/debug/di/rsthread.cpp | Updates generic-arg loading paths to use enumeration + accumulator. |
| src/coreclr/debug/di/rspriv.h | Adds a pointer-item callback adapter to CallbackAccumulator for FP_TYPEPARAM_CALLBACK. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Updates DAC implementation method declarations and associated comments. |
| src/coreclr/debug/daccess/dacdbiimpl.cpp | Implements the new enumeration methods in DAC and switches to callback emission. |
Copilot's findings
- Files reviewed: 12/12 changed files
- Comments generated: 4
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Open
3 tasks
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.
Refactor GetMethodDescParams and GetTypeHandleParams into enumeration methods. No new contracts.