Open
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 adds a new GetStackLimits cDAC API that exposes thread stack boundary information through the contract data access layer. The implementation mirrors the existing legacy DAC API and provides access to cached stack base, stack limit, and frame pointer address for debugging purposes.
Changes:
- Adds
CachedStackBaseandCachedStackLimitfields to the Thread data contract across all layers - Implements
IThread.GetStackLimitData()contract method returning stack boundary information - Migrates
ISOSDacInterface.GetStackLimits()from legacy-only to cDAC implementation with debug cross-validation
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/threads.h | Added CachedStackBase and CachedStackLimit field offsets to cdac_data; removed trailing whitespace |
| src/coreclr/vm/datadescriptor/datadescriptor.inc | Registered CachedStackBase and CachedStackLimit fields in the data descriptor |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Thread.cs | Added CachedStackBase and CachedStackLimit properties to Thread data structure |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IThread.cs | Added StackLimitData record struct and GetStackLimitData contract method |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Thread_1.cs | Implemented GetStackLimitData to return stack boundaries and frame address |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs | Migrated GetStackLimits from legacy pass-through to full cDAC implementation with debug assertions |
| src/native/managed/cdac/tests/ThreadTests.cs | Added test coverage for GetStackLimitData API |
| src/native/managed/cdac/tests/MockDescriptors/MockDescriptors.cs | Added CachedStackBase and CachedStackLimit to mock Thread type fields |
| src/native/managed/cdac/tests/MockDescriptors/MockDescriptors.Thread.cs | Added SetStackLimits helper method for test setup |
This was referenced Feb 21, 2026
Open
Contributor
|
Please update the markdown file docs/design/datacontracts/Thread.md with your new API and the new data descriptors used. |
rcj1
reviewed
Feb 21, 2026
...tive/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IThread.cs
Outdated
Show resolved
Hide resolved
rcj1
reviewed
Feb 21, 2026
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Thread.cs
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Thread_1.cs
Show resolved
Hide resolved
max-charlamb
approved these changes
Feb 23, 2026
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.
Add GetStackLimits cDAC API
Fixes #124696