Uh oh!
There was an error while loading. Please reload this page.
[cDAC]: Implement GetTypedByRefInfo, GetStringData, GetArrayData, GetBasicObjectInfo - #129200
Conversation
…sicObjectInfo (managed side) Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR extends the cDAC contracts and legacy DAC/DBI bridge to support additional object/typed-by-ref inspection APIs, and updates the CoreCLR DAC/DBI interface + right-side debugger plumbing to use more specific out-parameters (and a new object-data structure) for string/array/basic object queries.
Changes:
- Add
TypedByRefdata descriptor +IRuntimeTypeSystem.GetTypedByRefInfo(...)(with unit tests). - Add
IObject.GetStringData(...)andIObject.GetSize(...), and implement corresponding DAC/DBI entrypoints (GetStringData,GetArrayData,GetBasicObjectInfo,GetTypedByRefInfo) in the managed legacy bridge. - Refactor debugger-side object data plumbing: replace
DebuggerIPCE_ObjectDatawithDacDbiObjectDataand update IDL/interface declarations and DI callers accordingly.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/tests/UnitTests/MethodTableTests.cs | Adds unit tests validating GetTypedByRefInfo reads data/type fields correctly. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Updates managed COM projection signatures and introduces DacDbiArrayInfo. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements the updated DAC/DBI APIs using cDAC contracts, with DEBUG cross-checks. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/DataType.cs | Adds DataType.TypedByRef descriptor name. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/TypedByRef.cs | New data descriptor for TypedByRef (Data + Type fields). |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs | Implements GetTypedByRefInfo in the RuntimeTypeSystem contract. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Object_1.cs | Adds GetStringData and GetSize implementations in the Object contract. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IRuntimeTypeSystem.cs | Adds public TypedByRefInfo and GetTypedByRefInfo API surface. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IObject.cs | Adds public GetSize and GetStringData API surface. |
| src/coreclr/vm/datadescriptor/datadescriptor.inc | Adds TypedByRef to the CoreCLR cDAC data descriptor list. |
| src/coreclr/inc/dacdbi.idl | Updates IDL to the new out-parameter shapes and struct names. |
| src/coreclr/debug/inc/dbgipcevents.h | Removes DebuggerIPCE_ObjectData definition. |
| src/coreclr/debug/inc/dacdbistructures.h | Introduces DacDbiArrayInfo and DacDbiObjectData structures. |
| src/coreclr/debug/inc/dacdbiinterface.h | Updates DAC/DBI interface method signatures and associated comments. |
| src/coreclr/debug/di/rspriv.h | Switches DI-side storage/parameters from DebuggerIPCE_ObjectData to DacDbiObjectData. |
| src/coreclr/debug/di/process.cpp | Updates GetObjectInternal to use the new GetBasicObjectInfo signature. |
| src/coreclr/debug/di/divalue.cpp | Updates reference/object data initialization to call new DAC/DBI signatures for string/array/typed-byref. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Updates DAC implementation declarations to new signatures. |
| src/coreclr/debug/daccess/dacdbiimpl.cpp | Updates DAC implementations for typed-byref/string/array/basic object queries. |
| docs/design/datacontracts/RuntimeTypeSystem.md | Documents the new TypedByRef descriptor + GetTypedByRefInfo API. |
| docs/design/datacontracts/Object.md | Documents GetStringData / GetSize additions and intended behavior. |
Copilot's findings
- Files reviewed: 21/21 changed files
- Comments generated: 5
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Uh oh!
There was an error while loading. Please reload this page.
🤖 Copilot Code Review — PR #129200Note This review was generated by Copilot. Holistic AssessmentMotivation: Well-justified. The monolithic Approach: Sound. The PR systematically replaces Summary: Detailed Findings✅ Signature Propagation — Complete and correctAll four refactored DacDbi methods ( ✅ cDAC Contract Implementations — Follow established patterns
✅ Debug Validation — ThoroughAll four methods in ✅ DacDbiObjectData Replaces DebuggerIPCE_ObjectData — Clean transitionThe new
|
rcj1
commented
Jun 11, 2026
@copilot please add unit tests for GetStringData and GetSize. |
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Added Note This reply was generated by GitHub Copilot. |
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
rcj1
commented
Jun 12, 2026
/ba-g #129297 |
Uh oh!
There was an error while loading. Please reload this page.
…BasicObjectInfo (#129200) * Add two cDAC APIs on Object contract: ```csharp void GetStringData(TargetPointer address, out uint length, out uint offsetToFirstChar); ulong GetSize(TargetPointer address); ``` * Add one cDAC API on RuntimeTypeSystem: ```csharp TypedByRefInfo GetTypedByRefInfo(TargetPointer typedByRef); ``` * Implement DacDbi APIs, slightly modifying out params to be more specific to each API * Moving, renaming, and re-typing DebuggerIPCE_ObjectData * Add unit tests for `GetStringData` and `GetSize` to `ObjectTests.cs`, covering string length/offset and both fixed-size object and variable-size array sizing across architectures --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
GetStringDataandGetSizetoObjectTests.cs, covering string length/offset and both fixed-size object and variable-size array sizing across architectures