Struct minidump::MinidumpContext[][src]

pub struct MinidumpContext {
    pub raw: MinidumpRawContext,
    pub valid: MinidumpContextValidity,
}
Expand description

CPU context such as register states.

MinidumpContext carries a CPU-specific MDRawContext structure, which contains CPU context such as register states. Each thread has its own context, and the exception record, if present, also has its own context. Note that if the exception record is present, the context it refers to is probably what the user wants to use for the exception thread, instead of that thread’s own context. The exception thread’s context (as opposed to the exception record’s context) will contain context for the exception handler (which performs minidump generation), and not the context that caused the exception (which is probably what the user wants).

Fields

raw: MinidumpRawContext

The raw CPU register state.

valid: MinidumpContextValidity

Which registers are valid in raw.

Implementations

impl MinidumpContext[src]

pub fn from_raw(raw: MinidumpRawContext) -> MinidumpContext[src]

Return a MinidumpContext given a MinidumpRawContext.

pub fn read(
    bytes: &[u8],
    endian: Endian
) -> Result<MinidumpContext, ContextError>
[src]

Read a MinidumpContext from bytes.

pub fn get_instruction_pointer(&self) -> u64[src]

pub fn get_stack_pointer(&self) -> u64[src]

pub fn format_register(&self, reg: &str) -> String[src]

pub fn general_purpose_registers(&self) -> &'static [&'static str][src]

pub fn print<T: Write>(&self, f: &mut T) -> Result<()>[src]

Write a human-readable description of this MinidumpContext to f.

This is very verbose, it is the format used by minidump_dump.

Trait Implementations

impl Clone for MinidumpContext[src]

fn clone(&self) -> MinidumpContext[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for MinidumpContext[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.