Skip to content

Conversation

@max-charlamb
Copy link
Member

@max-charlamb max-charlamb commented Nov 6, 2025

See context for changes: #120303 (comment)

markdown lint failure is unrelated and fixed in: #121421

@dotnet-policy-service
Copy link
Contributor

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

Copy link
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 pull request introduces version 2 of the DebugInfo contract with a unified header format, while refactoring common code into a helper class. The new version replaces the flag byte approach of version 1 with a fat/slim chunk table for better extensibility.

  • Adds DebugInfo_2 implementing a new header format that encodes chunk sizes in nibble format
  • Extracts the bounds decoding logic into DebugInfoHelpers.DoBounds() for code reuse between versions
  • Updates documentation to describe the version 2 header encoding format
  • Removes PatchpointInfo data descriptors and related CDAC infrastructure

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfo_2.cs Implements version 2 of the DebugInfo contract with unified fat/slim header format for chunk size encoding
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfo_1.cs Refactored to use shared DebugInfoHelpers.DoBounds() method
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfoHelpers.cs New helper class containing shared bounds decoding logic with parameterized IL offset bias
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfoFactory.cs Registers version 2 implementation in the factory
src/coreclr/vm/datadescriptor/datadescriptor.inc Removes PatchpointInfo type definition from CDAC data descriptors
src/coreclr/inc/patchpointinfo.h Removes CDAC-related template specialization and friend declarations
docs/design/datacontracts/DebugInfo.md Documents version 2 header encoding and removes incorrect CodeVersions contract reference from version 1
Comments suppressed due to low confidence (1)

src/coreclr/vm/datadescriptor/datadescriptor.inc:667

  • The removal of the PatchpointInfo type will break DebugInfo_1 which still depends on it. The DebugInfo_1.cs implementation (lines 51-55) uses DataType.PatchpointInfo to read patchpoint information when the EXTRA_DEBUG_INFO_PATCHPOINT flag is set. This type definition should not be removed unless DebugInfo_1 is also updated to not rely on it, or Version 1 is being completely removed.
CDAC_TYPE_BEGIN(CodeHeapListNode)
CDAC_TYPE_FIELD(CodeHeapListNode, /*pointer*/, Next, offsetof(HeapList, hpNext))
CDAC_TYPE_FIELD(CodeHeapListNode, /*pointer*/, StartAddress, offsetof(HeapList, startAddress))
CDAC_TYPE_FIELD(CodeHeapListNode, /*pointer*/, EndAddress, offsetof(HeapList, endAddress))
CDAC_TYPE_FIELD(CodeHeapListNode, /*pointer*/, MapBase, offsetof(HeapList, mapBase))
CDAC_TYPE_FIELD(CodeHeapListNode, /*pointer*/, HeaderMap, offsetof(HeapList, pHdrMap))
CDAC_TYPE_END(CodeHeapListNode)

@max-charlamb
Copy link
Member Author

Known unrelated failure in runtime-diagnostics cDAC pipeline: #117785

@max-charlamb max-charlamb merged commit f84ba39 into dotnet:main Dec 1, 2025
100 of 102 checks passed
@max-charlamb max-charlamb deleted the cdac-debuginfo-2 branch December 1, 2025 14:52
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