[cDAC] Move ARM64 Stackwalking to managed code#116717
Merged
max-charlamb merged 10 commits intodotnet:mainfrom Jun 20, 2025
Merged
[cDAC] Move ARM64 Stackwalking to managed code#116717max-charlamb merged 10 commits intodotnet:mainfrom
max-charlamb merged 10 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR moves ARM64 stackwalking to managed code, updating the unwind logic in ARM64Context and introducing managed lookup tables for unwind codes.
- Calls to the native unwinding routine are replaced with an instance of ARM64Unwinder for improved managed integration.
- New lookup tables, UnwindCodeSizeTable and UnwindCodeInstructionCountTable, are added using modern C# 12 array initialization syntax.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/Context/ARM64Context.cs | Updated the Unwind method to use ARM64Unwinder and added a relevant using directive to support managed code logic. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/ARM64/LookupValues.cs | Introduced new lookup tables for unwind code sizes and instruction counts using modern C# 12 collection initialization syntax. |
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
This was referenced Jun 17, 2025
Open
Open
Member
Author
|
/azp run runtime-diagnostics |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
No pipelines are associated with this pull request. |
|
Azure Pipelines successfully started running 1 pipeline(s). |
am11
reviewed
Jun 18, 2025
...icrosoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/ARM64/ARM64Unwinder.cs
Show resolved
Hide resolved
am11
approved these changes
Jun 20, 2025
Member
am11
left a comment
There was a problem hiding this comment.
One nit, otherwise LGTM! 👍
cc @filipnavara managed stack unwinding! 💡
...t.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/Context/ARM64/LookupValues.cs
Outdated
Show resolved
Hide resolved
davidwrighton
approved these changes
Jun 20, 2025
This was referenced Jun 25, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Ports the ARM64 unwinder to managed code. The cDAC uses this managed version instead of deferring to the runtime native copy.
I'll remove the native linking in a follow-up PR.