Skip to content

Conversation

@max-charlamb
Copy link
Member

@max-charlamb max-charlamb commented Jan 30, 2026

  • Updates CordbAsyncStackWalk::PopulateFrame to ignore methods that are marked IsDiagnosticsHidden(). The relevant case is for async v2 -> async v1 thunks. These don't have debug info and can be skipped in the iteration. Previously this would throw an exception and fail.
  • For clarity renames IsILStubOrLCGMethod -> IsDiagnosticsHiddenOrLCGMethod to accurately represent behavior. (Behavior is unchanged in PR.
  • Misc whitespace fixes

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the async stack walking functionality to skip diagnostic-hidden methods (such as async v2 to async v1 thunks) when iterating the async continuation chain. These thunks lack debug information and should not be exposed as frames in the debugger.

Changes:

  • Modified CordbAsyncStackWalk::PopulateFrame to skip DiagnosticsHidden methods during stack iteration
  • Renamed IsILStubOrLCGMethod to IsDiagnosticsHiddenOrLCGMethod for naming accuracy
  • Renamed enum value kILStub to kDiagnosticHidden to reflect actual behavior
  • Applied whitespace cleanup (removed trailing whitespace)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/debug/inc/dacdbiinterface.h Renamed enum value and interface method, updated comments to reflect DiagnosticHidden terminology
src/coreclr/debug/daccess/dacdbiimpl.h Updated method declaration to use new name
src/coreclr/debug/daccess/dacdbiimpl.cpp Implemented method name change, updated return value to kDiagnosticHidden, whitespace cleanup
src/coreclr/debug/di/rsthread.cpp Updated all call sites to use new method name and enum value, whitespace cleanup
src/coreclr/debug/di/rsstackwalk.cpp Added loop to skip DiagnosticHidden frames during async stack walk, whitespace cleanup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants