[cDAC] Implement GetNativeCodeSequencePointsAndVarInfo for cDAC#129267
Merged
rcj1 merged 16 commits intoJul 10, 2026
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DAC↔DBI contract for GetNativeCodeSequencePointsAndVarInfo to use a callback-based enumeration model (instead of DBI-allocated output buffers), and wires up the managed cDAC (DacDbiImpl) implementation plus supporting interop structs and unit tests.
Changes:
- Replaces out-pointer buffer parameters with callback delegates for native var info and sequence points (IDL + native headers + native implementation + DBI consumer).
- Adds managed interop representations for native debug-info types and implements the cDAC-side method that enumerates var info and sequence points via callbacks.
- Adds unit tests for var location kind mapping and SourceTypes flag conversion.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/tests/UnitTests/DacDbiImplTests.cs | Adds unit tests for VarLoc kind/field mapping and SourceTypes flag conversion. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Adds managed interop structs/enums and updates method signature to callback-based pattern. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.NativeCodeInfo.cs | Adds conversion helpers, fixed-arg counting helper, and DEBUG legacy validation. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements callback-based GetNativeCodeSequencePointsAndVarInfo using cDAC contracts. |
| src/coreclr/inc/dacdbi.idl | Updates the COM IDL to define callback typedefs and the new method signature. |
| src/coreclr/inc/cordebuginfo.h | Documents that specific debug-info types are mirrored in managed code. |
| src/coreclr/debug/inc/dacdbiinterface.h | Updates the native interface signature and adds callback typedefs. |
| src/coreclr/debug/di/module.cpp | Updates CordbNativeCode::LoadNativeInfo to collect entries via callbacks and initialize its internal containers. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Updates the native DAC implementation signature to the new callback-based shape. |
| src/coreclr/debug/daccess/dacdbiimpl.cpp | Rewrites the DAC implementation to enumerate var info / sequence points and invoke callbacks. |
This was referenced Jun 11, 2026
Open
rcj1
reviewed
Jun 11, 2026
rcj1
reviewed
Jun 11, 2026
3 tasks
rcj1
reviewed
Jun 17, 2026
rcj1
reviewed
Jun 17, 2026
rcj1
reviewed
Jun 17, 2026
rcj1
reviewed
Jun 17, 2026
noahfalk
approved these changes
Jun 17, 2026
rcj1
reviewed
Jun 17, 2026
rcj1
approved these changes
Jul 2, 2026
This was referenced Jul 2, 2026
mdh1418
approved these changes
Jul 9, 2026
Contributor
|
/ba-g unrelated wasm tests |
eiriktsarpalis
pushed a commit
that referenced
this pull request
Jul 15, 2026
) ### Summary Implement `GetNativeCodeSequencePointsAndVarInfo` in the cDAC `DacDbiImpl`. The interface is changed from output-pointer parameters (`NativeVarData*`, `SequencePoints*`) to a callback pattern (`FP_NATIVEVARINFO_CALLBACK`, `FP_SEQUENCEPOINT_CALLBACK`), since the managed cDAC cannot use the native `forDbi` allocator. Also adds `TryGetMethodSignature` to `IRuntimeTypeSystem` to fix `GetArgCount` and `ClrDataFrame` methods failing on methods without metadata tokens (e.g. async variants), and removes the unused vlMemory member from ICorDebugInfo::VarLoc (with a JIT/EE version GUID bump). ### Changes - `dacdbi.idl` / `dacdbiinterface.h` / `dacdbiimpl.h` - Add callback typedefs, update method signature - `dacdbiimpl.cpp` - Rewrite method to use callbacks, remove `GetNativeVarData`/`GetSequencePoints` helpers - `module.cpp` - Rewrite `LoadNativeInfo` with callback struct - `IDacDbiInterface.cs` - Add `VarLocType`, `VarLoc`, `NativeVarInfo`, `DbiOffsetMapping` structs, DbiSourceTypes enum and update method signature - `DacDbiImpl.cs` - Implement `GetNativeCodeSequencePointsAndVarInfo` - `DacDbiImpl.NativeCodeInfo.cs` - conversion helpers and DEBUG validation - RuntimeTypeSystem.md - Document TryGetMethodSignature and AsyncMethodData descriptors - `DacDbiImplTests.cs` - unit tests for VarLoc type mapping, field-level conversion, and SourceTypes flag conversion - `IRuntimeTypeSystem.cs` / `RuntimeTypeSystem_1.cs` - Add `TryGetMethodSignature` - `AsyncMethodData.cs` / `method.hpp` / `siginfo.hpp` / `datadescriptor.inc` - Expose `Sig` and `cSig` fields from `AsyncMethodData` - `ClrDataFrame.cs` - Extract `GetFrameMethodDesc` helper, update callers to use `TryGetMethodSignature` - `TypeNameBuilder.cs` / `MethodSignatureHelpers.cs` - Use `TryGetMethodSignature` for signature resolution --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: rcj1 <rachel.jarvi@gmail.com>
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.
Summary
Implement
GetNativeCodeSequencePointsAndVarInfoin the cDACDacDbiImpl. The interface is changed from output-pointer parameters (NativeVarData*,SequencePoints*) to a callback pattern (FP_NATIVEVARINFO_CALLBACK,FP_SEQUENCEPOINT_CALLBACK), since the managed cDAC cannot use the nativeforDbiallocator.Also adds
TryGetMethodSignaturetoIRuntimeTypeSystemto fixGetArgCountandClrDataFramemethods failing on methods without metadata tokens (e.g. async variants), and removes the unused vlMemory member from ICorDebugInfo::VarLoc (with a JIT/EE version GUID bump).Changes
dacdbi.idl/dacdbiinterface.h/dacdbiimpl.h- Add callback typedefs, update method signaturedacdbiimpl.cpp- Rewrite method to use callbacks, removeGetNativeVarData/GetSequencePointshelpersmodule.cpp- RewriteLoadNativeInfowith callback structIDacDbiInterface.cs- AddVarLocType,VarLoc,NativeVarInfo,DbiOffsetMappingstructs, DbiSourceTypes enum and update method signatureDacDbiImpl.cs- ImplementGetNativeCodeSequencePointsAndVarInfoDacDbiImpl.NativeCodeInfo.cs- conversion helpers and DEBUG validationDacDbiImplTests.cs- unit tests for VarLoc type mapping, field-level conversion, and SourceTypes flag conversionIRuntimeTypeSystem.cs/RuntimeTypeSystem_1.cs- AddTryGetMethodSignatureAsyncMethodData.cs/method.hpp/siginfo.hpp/datadescriptor.inc- ExposeSigandcSigfields fromAsyncMethodDataClrDataFrame.cs- ExtractGetFrameMethodDeschelper, update callers to useTryGetMethodSignatureTypeNameBuilder.cs/MethodSignatureHelpers.cs- UseTryGetMethodSignaturefor signature resolution