Add DacDbiInterfaceInstance to cdac#130856
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new managed export (DacDbiInterfaceInstance) to the cDAC universal DAC so DBI can create an IDacDbiInterface backed by the managed data-contract reader, plus supporting interop declarations and unit tests around the standalone (non-legacy) path.
Changes:
- Added
DacDbiInterfaceInstanceunmanaged entrypoint and helper to build aContractDescriptorTargetfrom anICorDebugDataTarget. - Added interop declarations for
ICorDebugDataTargetandICLRRuntimeLocator, and updatedDbiVersionlayout to MS/LS words. - Implemented standalone
CheckDbiVersion/DacSetTargetConsistencyChecksbehaviors and added unit tests for them.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/tests/UnitTests/DacDbiImplTests.cs | Adds unit tests for standalone DacDbi version checking and consistency-checks toggling. |
| src/native/managed/cdac/mscordaccore_universal/Entrypoints.cs | Adds the new DacDbiInterfaceInstance export and target-construction helper for CorDebug data targets. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ICLRData.cs | Introduces ICLRRuntimeLocator COM interop declaration used for runtime base cross-checking. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Adds ICorDebugDataTarget interop and updates DbiVersion field layout to match native. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements standalone CheckDbiVersion and makes standalone DacSetTargetConsistencyChecks return success. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/CorDbHResults.cs | Adds CORDBG_E_INCOMPATIBLE_PROTOCOL constant for managed use. |
max-charlamb
left a comment
Member
There was a problem hiding this comment.
new entrypoint looks good to me.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…arget.TryCreate call Match the native DAC export by not requiring the allocator/metadata lookup pointers, and update CreateTargetFromCorDebugDataTarget to use the TryCreate factory (the address-based Create overload no longer exists on main). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
hoyosjs
force-pushed
the
juhoyosa/dacdbi-interface-instance
branch
from
July 17, 2026 03:09
7759eb5 to
557fd72
Compare
max-charlamb
approved these changes
Jul 17, 2026
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
hoyosjs
enabled auto-merge (squash)
July 17, 2026 18:09
noahfalk
approved these changes
Jul 17, 2026
hoyosjs
added a commit
to hoyosjs/runtime
that referenced
this pull request
Jul 17, 2026
This reverts commit f1eba34.
hoyosjs
added a commit
to hoyosjs/runtime
that referenced
this pull request
Jul 18, 2026
Squash the two commits from dotnet#130856 into one isolated change so it can be reverted independently.
hoyosjs
added a commit
to hoyosjs/runtime
that referenced
this pull request
Jul 18, 2026
This reverts commit f1eba34.
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.
Adds a
DacDbiInterfaceInstanceentrypoint to the cDAC (mscordaccore_universal) so DBI can obtain anIDacDbiInterfacebacked by the managed data-contract reader, mirroring the native DAC export of the same name and signature. Previously the cDAC only exposed the SOS /IXCLRDataProcesssurface viaCLRDataCreateInstance, so DBI could only be serviced through the native DAC.What this enables
ICorDebugDataTargetandICLRRuntimeLocator.Design decisions and tradeoffs
ICLRContractLocatoron the caller's data target). The passed runtime base is used only to cross-check againstICLRRuntimeLocator::GetRuntimeBasewhen the data target implements it, keeping the activation model consistent with the SOS path.E_NOTIMPL, which is sufficient for the DacDbi surface.DacSetTargetConsistencyChecksreturns success on the standalone path since it only toggles target assertions.Includes unit tests for the consistency-checks toggle.
Note
This description was drafted with GitHub Copilot.