Overhaul Register Capture - #1398
Draft
Aidan63 wants to merge 6 commits into
Draft
Conversation
added 6 commits
September 13, 2026 11:16
Not yet tested mac / arm, lets see what the ci says
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.
I noticed some inconsistencies in terms of how registers are captured and what is captured, so this is an attempt to unify them.
RtlCaptureContextwhere as previously only 64bit x86 would use it. I have not tested the Arm64 path as I don't have access to an Arm Windows device, maybe there's a VM image somewhere.RtlCaptureContextfunction which gives us access to the FXSAVE structure and NEON registers._fxsaveintrinsic is used for non Windows x86 to capture the floating point registers, previously the floating point registers were never captured.RegisterCapture::Capturefunction was used which contained four arguments to try and make sure the compiler couldn't pass arguments into functions as registers.Windows is still the only platform in which the Arm NEON registers are captured, I haven't found a nice way like _fxsave to capture all the extended state for Arm.
One issue is that 32bit x86 Windows seems to consistently crash in release mode, if I compile in debug mode it seems to run fine...