pub trait Instruction {
    // Provided methods
    fn address(&self) -> u64 { ... }
    fn size(&self) -> u64 { ... }
    fn raw(&self) -> &[u8]  { ... }
    fn mnemonic(&self) -> String { ... }
    fn to_string(&self) -> String { ... }
    fn is_call(&self) -> bool { ... }
    fn is_terminator(&self) -> bool { ... }
    fn is_branch(&self) -> bool { ... }
    fn is_syscall(&self) -> bool { ... }
}
Expand description

This trait is shared by all Instructions supported by LIEF

Provided Methods§

fn address(&self) -> u64

Address of the instruction

fn size(&self) -> u64

Size of the instruction in bytes

fn raw(&self) -> &[u8]

Raw bytes of the current instruction

fn mnemonic(&self) -> String

Instruction mnemonic (e.g. br)

fn to_string(&self) -> String

Representation of the current instruction in a pretty assembly way

fn is_call(&self) -> bool

True if the instruction is a call

fn is_terminator(&self) -> bool

True if the instruction marks the end of a basic block

fn is_branch(&self) -> bool

True if the instruction is a branch

fn is_syscall(&self) -> bool

True if the instruction is a syscall

Implementors§

§

impl Instruction for Instructions

§

impl Instruction for lief::assembly::aarch64::Instruction

§

impl Instruction for lief::assembly::arm::Instruction

§

impl Instruction for lief::assembly::ebpf::Instruction

§

impl Instruction for Generic

§

impl Instruction for lief::assembly::mips::Instruction

§

impl Instruction for lief::assembly::powerpc::Instruction

§

impl Instruction for lief::assembly::riscv::Instruction

§

impl Instruction for lief::assembly::x86::Instruction