[cDAC] Add IsManagedCode DacDbi API#129443
Merged
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the DAC/DBI “address classification” API by replacing the GetAddressType/AddressType enum surface with a single IsManagedCode boolean query, and updates both the native CoreCLR side and the managed cDAC legacy implementation + DI consumer to use the new API.
Changes:
- Replaced
GetAddressTypewithIsManagedCodein theIDacDbiInterfacecontract (IDL, native headers, managed projection). - Implemented
IsManagedCodein the native DAC DBI implementation and the managed cDACDacDbiImpl. - Updated the debugger DI (
process.cpp) to useIsManagedCodefor first-chance exception triage.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Updates managed COM projection to expose IsManagedCode instead of GetAddressType. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Adds the cDAC implementation of IsManagedCode and debug validation against legacy. |
| src/coreclr/inc/dacdbi.idl | Updates the IDL interface definition to IsManagedCode and removes AddressType. |
| src/coreclr/debug/inc/dacdbiinterface.h | Removes AddressType enum and replaces GetAddressType with IsManagedCode in the native interface header. |
| src/coreclr/debug/di/process.cpp | Switches exception triage logic to call IsManagedCode. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Updates the DAC DBI implementation declaration to IsManagedCode. |
| src/coreclr/debug/daccess/dacdbiimpl.cpp | Implements IsManagedCode using IsPossibleCodeAddress + ExecutionManager::IsManagedCode. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 1
davidwrighton
approved these changes
Jun 15, 2026
davidwrighton
left a comment
Member
There was a problem hiding this comment.
The Copilot comment looks like we might want to fix it, but otherwise this looks good. I particularly like removing the complexity of the IsStub api usage which we weren't actually using.
hoyosjs
approved these changes
Jun 15, 2026
noahfalk
approved these changes
Jun 16, 2026
Open
3 tasks
Contributor
Author
|
/ba-g timeouts |
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.
Previously this gave us a more granular enum that was largely unused - the output was only used to determine whether code was managed. So, I replaced it with an API that does just that.