Skip to content

[cDAC]: convert DacDbi GetRcwCachedInterfacePointers to EnumerateRcwCachedInterfacePointers and implement in cDAC#128341

Merged
rcj1 merged 2 commits into
mainfrom
copilot/modify-dacdbi-getrcwcachedinterfacepointers
May 19, 2026
Merged

[cDAC]: convert DacDbi GetRcwCachedInterfacePointers to EnumerateRcwCachedInterfacePointers and implement in cDAC#128341
rcj1 merged 2 commits into
mainfrom
copilot/modify-dacdbi-getrcwcachedinterfacepointers

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

  • Convert GetRcwCachedInterfacePointers to EnumerateRcwCachedInterfacePointers
  • Create template for these add-to-list callbacks

Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Copilot AI self-assigned this May 18, 2026
Copilot AI review requested due to automatic review settings May 18, 2026 22:04
Copilot AI review requested due to automatic review settings May 18, 2026 22:04
@rcj1 rcj1 changed the title Convert DacDbi GetRcwCachedInterfacePointers to callback-based enumerator [cDAC]: convert DacDbi GetRcwCachedInterfacePointers to EnumerateRcwCachedInterfacePointers and implement in cDAC May 18, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings May 18, 2026 22:48
Copy link
Copy Markdown
Contributor

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 converts the DAC/DBI RCW cached interface pointer query from an array-returning API to a callback-based enumeration API and adds the cDAC implementation path.

Changes:

  • Replaces GetRcwCachedInterfacePointers with EnumerateRcwCachedInterfacePointers across DAC/DBI interface definitions and consumers.
  • Implements cDAC RCW interface pointer enumeration using IBuiltInCOM.GetRCWInterfaces.
  • Adds a reusable DI-side CallbackAccumulator<T> helper and applies it to heap segment and RCW interface pointer enumeration.
Show a summary per file
File Description
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs Updates the managed DAC/DBI interface signature to the callback-based RCW enumerator.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs Adds the cDAC implementation for enumerating RCW cached interface pointers.
src/coreclr/vm/runtimecallablewrapper.h Removes the old RCW helper that built an array of cached interface pointers.
src/coreclr/inc/dacdbi.idl Updates the IDL contract with the new callback typedef and method.
src/coreclr/debug/inc/dacdbiinterface.h Updates the native DAC/DBI interface declaration and comments.
src/coreclr/debug/di/rspriv.h Adds the reusable callback accumulator helper.
src/coreclr/debug/di/process.cpp Refactors heap segment enumeration to use CallbackAccumulator<T>.
src/coreclr/debug/di/divalue.cpp Updates ICorDebugComObjectValue::GetCachedInterfacePointers to consume the new callback-based DAC API.
src/coreclr/debug/daccess/dacdbiimpl.h Updates the DAC implementation declaration.
src/coreclr/debug/daccess/dacdbiimpl.cpp Implements native callback-based RCW interface pointer enumeration.

Copilot's findings

  • Files reviewed: 10/10 changed files
  • Comments generated: 1

Copy link
Copy Markdown
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.

Looks nice 👍

@rcj1 rcj1 merged commit f397c83 into main May 19, 2026
123 of 126 checks passed
@rcj1 rcj1 deleted the copilot/modify-dacdbi-getrcwcachedinterfacepointers branch May 19, 2026 22:41
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.

4 participants