#[repr(C)]pub struct UserRegisters {
pub regs: GeneralRegisters,
pub vector: u64,
pub error_code: u64,
pub rip: u64,
pub cs: u64,
pub rflags: u64,
pub rsp: u64,
pub ss: u64,
}Expand description
Saved registers when a trap (interrupt or exception) occurs.
Fields§
§regs: GeneralRegistersSoftware-saved general registers, shared with virtualization entries.
vector: u64Trap vector supplied by the assembly entry.
error_code: u64Hardware error code, or zero for vectors without one.
rip: u64Interrupted instruction pointer.
cs: u64Interrupted code segment selector.
rflags: u64Interrupted flags register.
rsp: u64Interrupted stack pointer, saved even for a same-privilege entry.
ss: u64Interrupted stack segment selector.
Implementations§
Source§impl TrapFrame
impl TrapFrame
Sourcepub fn interrupted_context(&self) -> InterruptedContext
pub fn interrupted_context(&self) -> InterruptedContext
Copies IRQ sampling values from this saved machine image.
Sourcepub const fn origin(&self) -> TrapOrigin
pub const fn origin(&self) -> TrapOrigin
Returns the privilege domain represented by this register image.
Sourcepub const fn set_retval(&mut self, rax: usize)
pub const fn set_retval(&mut self, rax: usize)
Sets the return value register.
Sourcepub fn backtrace_registers(&self) -> BacktraceRegisters
pub fn backtrace_registers(&self) -> BacktraceRegisters
Copies the machine registers needed by a runtime stack unwinder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrapFrame
impl RefUnwindSafe for TrapFrame
impl Send for TrapFrame
impl Sync for TrapFrame
impl Unpin for TrapFrame
impl UnsafeUnpin for TrapFrame
impl UnwindSafe for TrapFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more