pub enum JumperKind {
ShortRel,
Short,
Long,
}
Expand description
the different kinds of jumper available
Variants§
ShortRel
a short relative jumper, which is a 32 bit relative jump.
Short
a short jumper, which is a push 32 bit address followed by a ret instruction.
Long
a long jumper, which is a jmp to rip followed by the raw 64 bit address.
Implementations§
Source§impl JumperKind
impl JumperKind
Sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
returns the size of the jumper in bytes
Sourcepub fn build(&self, jumper_addr: u64, target_addr: u64) -> JumperBytes
pub fn build(&self, jumper_addr: u64, target_addr: u64) -> JumperBytes
builds the jumper into an array of bytes.
Trait Implementations§
Source§impl Clone for JumperKind
impl Clone for JumperKind
Source§fn clone(&self) -> JumperKind
fn clone(&self) -> JumperKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JumperKind
impl Debug for JumperKind
Source§impl Hash for JumperKind
impl Hash for JumperKind
Source§impl PartialEq for JumperKind
impl PartialEq for JumperKind
impl Copy for JumperKind
impl Eq for JumperKind
impl StructuralPartialEq for JumperKind
Auto Trait Implementations§
impl Freeze for JumperKind
impl RefUnwindSafe for JumperKind
impl Send for JumperKind
impl Sync for JumperKind
impl Unpin for JumperKind
impl UnwindSafe for JumperKind
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