Uh oh!
There was an error while loading. Please reload this page.
[cDAC] Update DebugInfo contract for new format - #121418
Conversation
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
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)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
max-charlamb
commented
Dec 1, 2025
Known unrelated failure in runtime-diagnostics cDAC pipeline: #117785 |
See context for changes: #120303 (comment)
markdown lint failure is unrelated and fixed in: #121421