Skip to content

[cDAC] Add IsManagedCode DacDbi API#129443

Merged
rcj1 merged 4 commits into
dotnet:mainfrom
rcj1:address-type
Jun 16, 2026
Merged

[cDAC] Add IsManagedCode DacDbi API#129443
rcj1 merged 4 commits into
dotnet:mainfrom
rcj1:address-type

Conversation

@rcj1

@rcj1 rcj1 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings June 15, 2026 21:50
@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 left a comment

Copy link
Copy Markdown
Contributor

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 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 GetAddressType with IsManagedCode in the IDacDbiInterface contract (IDL, native headers, managed projection).
  • Implemented IsManagedCode in the native DAC DBI implementation and the managed cDAC DacDbiImpl.
  • Updated the debugger DI (process.cpp) to use IsManagedCode for 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 davidwrighton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI review requested due to automatic review settings June 15, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

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

@rcj1

rcj1 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/ba-g timeouts

@rcj1 rcj1 merged commit a4a5adf into dotnet:main Jun 16, 2026
129 of 138 checks passed
@rcj1 rcj1 deleted the address-type branch June 16, 2026 12:56
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.

5 participants