Skip to content

[cDAC] Implement DacDbi GetCollectibleTypeStaticAddress#128288

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/implement-dacdbi-api-getcollectibletype-static-add
Open

[cDAC] Implement DacDbi GetCollectibleTypeStaticAddress#128288
Copilot wants to merge 2 commits into
mainfrom
copilot/implement-dacdbi-api-getcollectibletype-static-add

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

Adjust GetFieldDescStaticAddress and GetFieldDescThreadStaticAddress to take a parameter of whether to unbox boxed value types.

Copilot AI review requested due to automatic review settings May 16, 2026 17:41
Copilot AI review requested due to automatic review settings May 16, 2026 17:41
@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.

@rcj1 rcj1 marked this pull request as ready for review May 16, 2026 17:52
Copilot AI review requested due to automatic review settings May 16, 2026 17:52
@rcj1 rcj1 changed the title Implement DacDbi GetCollectibleTypeStaticAddress in cDAC [cDAC] Implement DacDbi GetCollectibleTypeStaticAddress May 16, 2026
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 updates the cDAC RuntimeTypeSystem contract to allow callers to choose whether value-type statics/thread-statics should be dereferenced (“unboxed”) when computing their addresses, and then uses that capability to implement DacDbiImpl.GetCollectibleTypeStaticAddress in the non-legacy path.

Changes:

  • Implement DacDbiImpl.GetCollectibleTypeStaticAddress via IRuntimeTypeSystem.GetFieldDescStaticAddress(..., unboxValueTypes: false).
  • Extend IRuntimeTypeSystem.GetFieldDescStaticAddress / GetFieldDescThreadStaticAddress with a unboxValueTypes parameter and thread it through RuntimeTypeSystem_1.
  • Update the RuntimeTypeSystem design doc to describe the new parameter/semantics.
Show a summary per file
File Description
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs Implements GetCollectibleTypeStaticAddress using the RuntimeTypeSystem contract and validates against legacy in DEBUG.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs Adds unboxValueTypes plumbing to the shared static/thread-static address resolver and interface implementations.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IRuntimeTypeSystem.cs Updates the contract method signatures to include the optional unboxValueTypes parameter.
docs/design/datacontracts/RuntimeTypeSystem.md Documents the new parameter and clarifies boxed-vs-unboxed address behavior.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 2

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.

3 participants