Skip to content

Runtime-async continuation object reading with Cordb#121432

Merged
rcj1 merged 2 commits intodotnet:mainfrom
rcj1:continuation-cordb
Dec 1, 2025
Merged

Runtime-async continuation object reading with Cordb#121432
rcj1 merged 2 commits intodotnet:mainfrom
rcj1:continuation-cordb

Conversation

@rcj1
Copy link
Contributor

@rcj1 rcj1 commented Nov 7, 2025

This PR ensures that we are able to access continuation objects through APIs such as CordbObjectValue::GetFieldValue. As the dynamically generated continuation types with the local variable fields do not have metadata, we use the parent class which does have metadata. We will therefore not be able to view the locals fields through these APIs, but with the low likelihood that someone is digging this deep into implementation details, this should be an acceptable trade-off.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @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 adds special handling for continuation types in the debugger to map them to their base continuation class type for debugging purposes. The variable name "IfSubTypeCreated" suggests this is a lazily-initialized global that may be NULL before any continuation subtypes are created.

  • Adds checks for continuation types using IsContinuation() in debugger type conversion functions
  • Replaces continuation subtypes with the base continuation class type (g_pContinuationClassIfSubTypeCreated) for debugger type information
  • Applies this pattern consistently across both EE debugger and DAC debugger interface implementations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/coreclr/debug/ee/debugger.cpp Adds continuation type handling in TypeHandleToBasicTypeInfo and TypeHandleToExpandedTypeInfo to replace continuation types with base class
src/coreclr/debug/daccess/dacdbiimpl.cpp Adds continuation type handling in GetClassTypeInfo and TypeHandleToBasicTypeInfo (DAC version) with same replacement pattern

Copy link
Member

@thaystg thaystg left a comment

Choose a reason for hiding this comment

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

LGTM

@rcj1
Copy link
Contributor Author

rcj1 commented Dec 1, 2025

/ba-g unrelated fails

@rcj1 rcj1 merged commit 96b4bf9 into dotnet:main Dec 1, 2025
87 of 99 checks passed
@rcj1 rcj1 deleted the continuation-cordb branch December 1, 2025 17:58
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants