Struct minidump_writer::minidump_format::format::CONTEXT_ARM64
source · [−]pub struct CONTEXT_ARM64 {
pub context_flags: u32,
pub cpsr: u32,
pub iregs: [u64; 31],
pub sp: u64,
pub pc: u64,
pub float_regs: [u128; 32],
pub fpcr: u32,
pub fpsr: u32,
pub bcr: [u32; 8],
pub bvr: [u64; 8],
pub wcr: [u32; 2],
pub wvr: [u64; 2],
}
Expand description
A (microsoft-style) aarch64 (arm64) CPU context
This matches the layout of how Windows defines this type. Breakpad defines it in an equivalent but more-quirky way that relies more on packing.
For general purpose registers:
- microsoft: make iregs have 31 values and have sp and pc as explicit fields.
- breakpad make iregs have 33 values, no explicit fields.
For float registers:
- microsoft: inline the fields for float_regs, fpcr, fpsr.
- breakpad: wrap them in a struct.
Why we went with these definitions:
-
ARM64 actually defines x0..x30 register names, but sp and pc aren’t “x31” and “x32”. Breakpad is effectively punning them as such, and that’s kinda weird?
-
Microsft’s inlining of the float registers eliminates any need for padding on all platforms (note how there’s always an even number of u32’s before a u64, and an even number of u64’s before a u128!)
NOTE: if you ever decide to try to make this repr(C) and get really clever, note that microsoft aligns this to 16 (and as of this writing, rust does not consistently aling u128 as such).
Fields
context_flags: u32
cpsr: u32
iregs: [u64; 31]
[x0, x1, ..., x28, fp, lr]
. See Arm64RegisterNumbers.
sp: u64
pc: u64
float_regs: [u128; 32]
float/NEON registers [d0, d1, ..., d31]
fpcr: u32
FPU control register.
fpsr: u32
FPU status register.
bcr: [u32; 8]
bvr: [u64; 8]
wcr: [u32; 2]
wvr: [u64; 2]
Trait Implementations
sourceimpl Clone for CONTEXT_ARM64
impl Clone for CONTEXT_ARM64
sourcefn clone(&self) -> CONTEXT_ARM64
fn clone(&self) -> CONTEXT_ARM64
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CONTEXT_ARM64
impl Debug for CONTEXT_ARM64
sourceimpl Default for CONTEXT_ARM64
impl Default for CONTEXT_ARM64
sourcefn default() -> CONTEXT_ARM64
fn default() -> CONTEXT_ARM64
Returns the “default value” for a type. Read more
sourceimpl<'a> TryFromCtx<'a, Endian, [u8]> for CONTEXT_ARM64 where
CONTEXT_ARM64: 'a,
impl<'a> TryFromCtx<'a, Endian, [u8]> for CONTEXT_ARM64 where
CONTEXT_ARM64: 'a,
type Error = Error
fn try_from_ctx(
src: &'a [u8],
ctx: Endian
) -> Result<(CONTEXT_ARM64, usize), <CONTEXT_ARM64 as TryFromCtx<'a, Endian, [u8]>>::Error>
Auto Trait Implementations
impl RefUnwindSafe for CONTEXT_ARM64
impl Send for CONTEXT_ARM64
impl Sync for CONTEXT_ARM64
impl Unpin for CONTEXT_ARM64
impl UnwindSafe for CONTEXT_ARM64
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more