[cDAC] X86 support HijackFrame#116829
Merged
max-charlamb merged 2 commits intodotnet:mainfrom Jun 20, 2025
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for capturing and handling x86 hijack frames in the DataContractReader, extending both the data contract and the frame handler, plus updating the core runtime descriptor and documentation.
- Introduce
HijackArgsX86to read x86-specific hijack registers into a dictionary - Implement
HandleHijackFrameinX86FrameHandlerto restore registers and adjust the stack pointer - Extend
datadescriptor.hfor x86 register fields and update docs to include x86 HijackArgs
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/native/managed/cdac/.../Data/Frames/HijackArgsX86.cs | Add x86-specific HijackArgsX86 data reader |
| src/native/managed/cdac/.../StackWalk/FrameHandling/X86FrameHandler.cs | Implement HandleHijackFrame for x86 |
| src/coreclr/debug/runtimeinfo/datadescriptor.h | Add x86 register fields (Edi, Esi, etc.) |
| docs/design/datacontracts/StackWalk.md | Update docs table to include x86 in HijackArgs entries |
Comments suppressed due to low confidence (2)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/FrameHandling/X86FrameHandler.cs:29
- No tests were added to verify the new x86 HijackFrame handling path; consider adding unit or integration tests to cover this functionality.
HijackArgsX86 args = _target.ProcessedData.GetOrAdd<HijackArgsX86>(frame.HijackArgsPtr);
docs/design/datacontracts/StackWalk.md:59
- [nitpick] The entry 'HijackArgs (arm64/x86)' may be ambiguous; consider splitting into separate rows for arm64 and x86 or clarifying platform-specific details.
| `HijackArgs` (arm64/x86) | For each register `r` saved in HijackArgs, `r` | Register names associated with stored register values |
...iagnostics.DataContractReader.Contracts/Contracts/StackWalk/FrameHandling/X86FrameHandler.cs
Outdated
Show resolved
Hide resolved
9 tasks
This was referenced Jun 19, 2025
Open
davidwrighton
approved these changes
Jun 20, 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.
Contributes to #114019
Verified using the following script to get a
[HijackFrame]on the stack: