[cDAC] Implement DacDbi APIs TypeHandleToExpandedTypeInfo and GetObjectExpandedTypeInfo#128001
Merged
Merged
Conversation
add fill expanded type data apis
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the cDAC DacDbi surface to produce DebuggerIPCE_ExpandedTypeData for a type handle or object address, and adds a RuntimeTypeSystem contract helper for recognizing the System.Object method table (so ELEMENT_TYPE_OBJECT can be reported distinctly from ELEMENT_TYPE_CLASS).
Changes:
- Add
IRuntimeTypeSystem.IsObject(TypeHandle)and plumb a newObjectMethodTableglobal through the contract + test mocks. - Implement
TypeHandleToExpandedTypeInfoandGetObjectExpandedTypeInfoin the managedDacDbiImpl, including little-endian writes matching nativePortable<T>. - Update native DBI interface/IDL and call sites to route “type id -> type info” through
TypeHandleToExpandedTypeInfo, and removeGetObjectExpandedTypeInfoFromID.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/tests/MockDescriptors/MockDescriptors.RuntimeTypeSystem.cs | Adds a mock global for the Object method table and patches it to System.Object’s MT in the mock target. |
| src/native/managed/cdac/tests/MethodTableTests.cs | Extends contract globals and asserts IsObject behavior for FreeObject MT vs System.Object MT. |
| src/native/managed/cdac/tests/DumpTests/RuntimeTypeSystemDumpTests.cs | Adds dump-based assertions for IsObject across object/free/string MTs. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Introduces managed projections of AreValueTypesBoxed and DebuggerIPCE_*TypeData and updates method signatures to typed pointers. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements TypeHandleToExpandedTypeInfo / GetObjectExpandedTypeInfo and shared filling helpers with Portable-compatible endianness. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs | Reads the ObjectMethodTable global and implements IsObject. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IRuntimeTypeSystem.cs | Adds the new IsObject(TypeHandle) API to the public contract interface. |
| src/coreclr/inc/dacdbi.idl | Changes TypeHandleToExpandedTypeInfo to take a raw UINT64 and drops GetObjectExpandedTypeInfoFromID. |
| src/coreclr/debug/inc/dacdbistructures.h | Gives AreValueTypesBoxed explicit values (0/1/2). |
| src/coreclr/debug/inc/dacdbiinterface.h | Updates the COM interface signature and removes GetObjectExpandedTypeInfoFromID. |
| src/coreclr/debug/di/rstype.cpp | Updates RS to call the new TypeHandleToExpandedTypeInfo signature (but currently extracts the handle unsafely). |
| src/coreclr/debug/di/process.cpp | Routes GetTypeForTypeID through TypeHandleToExpandedTypeInfo using COR_TYPEID.token1. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Updates DAC interface declaration to match the new signature. |
| src/coreclr/debug/daccess/dacdbiimpl.cpp | Removes the old FromID method and updates implementation/callers for the new signature + zero-inits output structs. |
| docs/design/datacontracts/RuntimeTypeSystem.md | Documents IsObject and the ObjectMethodTable global (but the globals table still has an incorrect FreeObject global name). |
Copilot's findings
- Files reviewed: 15/15 changed files
- Comments generated: 5
This was referenced May 10, 2026
Open
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot
AI
changed the title
[cDAC] Add DacDbi APIs to fill DebuggerIPCE_ExpandedTypeData
Switch DacDbi expanded type info APIs back to VMPTR inputs
May 12, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
noahfalk
reviewed
May 14, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
noahfalk
approved these changes
May 18, 2026
Contributor
|
/ba-g shebang analyzer issue |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
After #128058 goes in the
memcpyfrom a VMPTR will be awkward but correct. I figured it's ok that it's awkward because this is not really something we should be doing all the time.