[cDAC] Update DebugInfo contract for new format#121418
Merged
max-charlamb merged 13 commits intodotnet:mainfrom Dec 1, 2025
Merged
[cDAC] Update DebugInfo contract for new format#121418max-charlamb merged 13 commits intodotnet:mainfrom
max-charlamb merged 13 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
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_2implementing 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
PatchpointInfotype will breakDebugInfo_1which still depends on it. TheDebugInfo_1.csimplementation (lines 51-55) usesDataType.PatchpointInfoto read patchpoint information when theEXTRA_DEBUG_INFO_PATCHPOINTflag is set. This type definition should not be removed unlessDebugInfo_1is 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)
This was referenced Nov 7, 2025
Open
jakobbotsch
reviewed
Nov 7, 2025
...c/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfoHelpers.cs
Outdated
Show resolved
Hide resolved
jakobbotsch
reviewed
Nov 7, 2025
...d/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfo_2.cs
Outdated
Show resolved
Hide resolved
noahfalk
reviewed
Nov 8, 2025
...d/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfo_2.cs
Show resolved
Hide resolved
...c/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfoHelpers.cs
Outdated
Show resolved
Hide resolved
davidwrighton
approved these changes
Nov 11, 2025
3 tasks
Member
Author
|
Known unrelated failure in runtime-diagnostics cDAC pipeline: #117785 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See context for changes: #120303 (comment)
markdown lint failure is unrelated and fixed in: #121421