pub struct Registers {Show 49 fields
pub rax: u64,
pub rbx: u64,
pub rcx: u64,
pub rdx: u64,
pub rbp: u64,
pub rsi: u64,
pub rdi: u64,
pub rsp: u64,
pub r8: u64,
pub r9: u64,
pub r10: u64,
pub r11: u64,
pub r12: u64,
pub r13: u64,
pub r14: u64,
pub r15: u64,
pub rip: u64,
pub rflags: Rflags,
pub cr0: Cr0,
pub cr2: Cr2,
pub cr3: Cr3,
pub cr4: Cr4,
pub dr0: Dr0,
pub dr1: Dr1,
pub dr2: Dr2,
pub dr3: Dr3,
pub dr6: Dr6,
pub dr7: Dr7,
pub cs: SegmentDescriptor,
pub ds: SegmentDescriptor,
pub es: SegmentDescriptor,
pub fs: SegmentDescriptor,
pub gs: SegmentDescriptor,
pub ss: SegmentDescriptor,
pub tr: SegmentDescriptor,
pub ldtr: SegmentDescriptor,
pub idtr: Idtr,
pub gdtr: Gdtr,
pub sysenter_cs: u64,
pub sysenter_esp: u64,
pub sysenter_eip: u64,
pub shadow_gs: u64,
pub msr_flags: u64,
pub msr_lstar: u64,
pub msr_star: u64,
pub msr_cstar: u64,
pub msr_syscall_mask: u64,
pub msr_efer: MsrEfer,
pub msr_tsc_aux: u64,
}Available on crate feature
arch-amd64 only.Expand description
The state of the CPU registers.
Fields§
§rax: u64§rbx: u64§rcx: u64§rdx: u64§rbp: u64§rsi: u64§rdi: u64§rsp: u64§r8: u64§r9: u64§r10: u64§r11: u64§r12: u64§r13: u64§r14: u64§r15: u64§rip: u64§rflags: Rflags§cr0: Cr0§cr2: Cr2§cr3: Cr3§cr4: Cr4§dr0: Dr0§dr1: Dr1§dr2: Dr2§dr3: Dr3§dr6: Dr6§dr7: Dr7§cs: SegmentDescriptor§ds: SegmentDescriptor§es: SegmentDescriptor§fs: SegmentDescriptor§gs: SegmentDescriptor§ss: SegmentDescriptor§tr: SegmentDescriptor§ldtr: SegmentDescriptor§idtr: Idtr§gdtr: Gdtr§sysenter_cs: u64§sysenter_esp: u64§sysenter_eip: u64§shadow_gs: u64§msr_flags: u64§msr_lstar: u64§msr_star: u64§msr_cstar: u64§msr_syscall_mask: u64§msr_efer: MsrEfer§msr_tsc_aux: u64Trait Implementations§
impl Copy for Registers
impl Eq for Registers
Source§impl From<&Registers> for UnwindContextAmd64
impl From<&Registers> for UnwindContextAmd64
Source§fn from(value: &Registers) -> UnwindContextAmd64
fn from(value: &Registers) -> UnwindContextAmd64
Converts to this type from the input type.
Source§impl Registers for Registers
impl Registers for Registers
Source§type Architecture = Amd64
type Architecture = Amd64
The specific CPU architecture implementation.
Source§type GpRegisters = GpRegisters
type GpRegisters = GpRegisters
General-purpose registers of the architecture. Read more
Source§fn instruction_pointer(&self) -> u64
fn instruction_pointer(&self) -> u64
Returns the current value of the instruction pointer. Read more
Source§fn set_instruction_pointer(&mut self, ip: u64)
fn set_instruction_pointer(&mut self, ip: u64)
Sets the value of the instruction pointer. Read more
Source§fn stack_pointer(&self) -> u64
fn stack_pointer(&self) -> u64
Returns the current value of the stack pointer. Read more
Source§fn set_stack_pointer(&mut self, sp: u64)
fn set_stack_pointer(&mut self, sp: u64)
Sets the value of the stack pointer. Read more
Source§fn set_result(&mut self, result: u64)
fn set_result(&mut self, result: u64)
Sets the value of the result register. Read more
Source§fn gp_registers(&self) -> GpRegisters
fn gp_registers(&self) -> GpRegisters
Returns a copy of all general-purpose registers.
Source§fn set_gp_registers(&mut self, gp: &GpRegisters)
fn set_gp_registers(&mut self, gp: &GpRegisters)
Sets all general-purpose registers.
Source§fn address_width(&self) -> usize
fn address_width(&self) -> usize
Returns the native address width (i.e. pointer size) of the architecture
in bytes. Read more
Source§fn effective_address_width(&self) -> usize
fn effective_address_width(&self) -> usize
Returns the effective address width, which may differ from the native
width (e.g., in compatibility modes). Read more
Source§fn access_context(&self, va: Va) -> AccessContext
fn access_context(&self, va: Va) -> AccessContext
Creates an access context for a given virtual address.
Source§fn address_context(&self, va: Va) -> AddressContext
fn address_context(&self, va: Va) -> AddressContext
Creates an address context for a given virtual address.
Source§fn translation_root(&self, _va: Va) -> Pa
fn translation_root(&self, _va: Va) -> Pa
Returns the physical address of the root of the current page table
hierarchy for a given virtual address. Read more
Source§fn set_translation_root(&mut self, root: u64, _va: Va)
fn set_translation_root(&mut self, root: u64, _va: Va)
Sets the physical address of the root of the current page table hierarchy
for a given virtual address. Read more
Source§fn return_address<Driver>(&self, vmi: &VmiCore<Driver>) -> Result<Va, VmiError>where
Driver: VmiRead,
fn return_address<Driver>(&self, vmi: &VmiCore<Driver>) -> Result<Va, VmiError>where
Driver: VmiRead,
Attempts to determine the return address of the current function call. Read more
impl StructuralPartialEq for Registers
Source§impl WindowsRegistersAdapter for Registers
impl WindowsRegistersAdapter for Registers
Source§fn write_context(&mut self, context: &impl WindowsContext)
fn write_context(&mut self, context: &impl WindowsContext)
Writes general-purpose registers, instruction pointer, flags, and segment selectors.
Source§fn write_special_registers(
&mut self,
special_registers: &impl WindowsSpecialRegisters,
)
fn write_special_registers( &mut self, special_registers: &impl WindowsSpecialRegisters, )
Writes control registers, debug registers, and descriptor tables.
Auto Trait Implementations§
impl Freeze for Registers
impl RefUnwindSafe for Registers
impl Send for Registers
impl Sync for Registers
impl Unpin for Registers
impl UnsafeUnpin for Registers
impl UnwindSafe for Registers
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.