This adds a replacement for RtlCaptureContext ported from Crashpad. The implementation is put here since this crate is used by both crash-handling in this repo, as well as minidump-writer, and unfortunately the bindings for both winapi and windows-sys are currently...broken. Neither of them properly align the CONTEXT structures on x86_64/aarch64, which can cause crashes and is just generally uhhh, not good. Since we already have replacments for getcontext on Linux it made sense to put it here. Additionally, unlike RtlCaptureContext, the x86_64 (though not aarch64) implementation captures floating point and vector state as well.
This adds a replacement for
RtlCaptureContext
ported from Crashpad. The implementation is put here since this crate is used by bothcrash-handling
in this repo, as well asminidump-writer
, and unfortunately the bindings for bothwinapi
andwindows-sys
are currently...broken. Neither of them properly align theCONTEXT
structures on x86_64/aarch64, which can cause crashes and is just generally uhhh, not good. Since we already have replacments for getcontext on Linux it made sense to put it here. Additionally, unlikeRtlCaptureContext
, the x86_64 (though not aarch64) implementation captures floating point and vector state as well.