Uh oh!
There was an error while loading. Please reload this page.
[cDAC] Add stackwalk DAC flags - #131901
Conversation
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
There was a problem hiding this comment.
Pull request overview
This PR updates the cDAC legacy IXCLRData stack-walk surface to accept flags for IXCLRDataTask.CreateStackWalk, and threads those flags through to ClrDataStackWalk to influence which frames are surfaced during enumeration.
Changes:
- Change
IXCLRDataTask.CreateStackWalkto take a newCLRDataStackWalkFlagenum instead of a rawuint. - Add
CLRDataStackWalkFlagand plumb the flag type throughClrDataTaskandClrDataStackWalk. - Use the provided flags in
ClrDataStackWalkto filter whichStackWalkStatevalues are considered “legacy visible”.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/IXCLRData.cs | Updates the COM interface signature and introduces CLRDataStackWalkFlag. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataTask.cs | Propagates the new flag type through the task’s CreateStackWalk implementation (including legacy forwarding). |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataStackWalk.cs | Stores the flags and applies them when deciding which frames to surface. |
Copilot's findings
Suppressed comments (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataTask.cs:86
- This PR adds new flag-dependent behavior for
IXCLRDataTask.CreateStackWalk, but the cDAC test suite does not currently exerciseIXCLRDataStackWalkenumeration with non-zero flags (or validate that the filtered frame set stays in sync with the legacy DAC when_legacyImplis present). Adding at least one unit/integration test covering the flag behavior would help prevent regressions.
int IXCLRDataTask.CreateStackWalk(CLRDataStackWalkFlag flags, DacComNullableByRef<IXCLRDataStackWalk> stackWalk)
{
Contracts.ThreadData threadData = _target.Contracts.Thread.GetThreadData(_address);
if (threadData.State.HasFlag(Contracts.ThreadState.Unstarted))
return HResults.E_FAIL;
IXCLRDataStackWalk? legacyStackWalk = null;
if (_legacyImpl is not null)
{
DacComNullableByRef<IXCLRDataStackWalk> legacyStackWalkOut = new(isNullRef: false);
int hr = _legacyImpl.CreateStackWalk(flags, legacyStackWalkOut);
if (hr < 0)
return hr;
legacyStackWalk = legacyStackWalkOut.Interface;
}
stackWalk.Interface = new ClrDataStackWalk(_address, flags, _target, legacyStackWalk);
return HResults.S_OK;
- Files reviewed: 3/3 changed files
- Comments generated: 3
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.
rcj1
commented
Aug 6, 2026
/ba-g #131956 |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#112366