Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RtlCaptureContext replacement #65

Merged
merged 5 commits into from
Nov 17, 2022
Merged

Use RtlCaptureContext replacement #65

merged 5 commits into from
Nov 17, 2022

Conversation

Jake-Shadle
Copy link
Collaborator

This updates crash-context to 0.5, which includes a replacement capture_context function for RtlCaptureContext. This was done because both winapi and windows-sys provide incorrect bindings due to not aligning CONTEXT and related structs correctly, which can result in crashes when RtlCaptureContext is used. Additionally on x86_64, the replacement also captures floating point and vector state which RtlCaptureContext doesn't do.

The other big change is that we now just bite the bullet and use winapi for most of the other bindings used by this crate. I was initially against this in #58 because it felt like taking a step back, but most codebases will already depend on winapi 0.3 so it shouldn't matter to add the dependency, and does make it easier to interoperate with other crates.

Resolves: #63

This uses the RtlCaptureContext replacement from crash-context, which
also has correct bindings for CONTEXT.

This also changes to use winapi for most bindings, other than some
minidump related types/functions that are not provided by winapi.
Crash-context needs to add capture_context impl if needed

Also just cleans up the markdown table to be easier to edit
@Jake-Shadle Jake-Shadle merged commit 2019a00 into main Nov 17, 2022
@Jake-Shadle Jake-Shadle deleted the windows/context branch November 17, 2022 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug Windows shenanigans
1 participant