Struct capstone_rust::capstone::Instr
[−]
[src]
pub struct Instr { pub id: InstrIdArch, pub address: u64, pub size: u16, pub bytes: Vec<u8>, pub mnemonic: String, pub op_str: String, pub detail: Option<Details>, }
Disassembled instruction.
A Rust-friendly struct to access fields of a disassembled instruction. This is a safe wrapper over cs_insn.
Fields
id: InstrIdArch
Instruction ID. Find the instruction id in the '[ARCH]_insn' enum in the header file of corresponding architecture.
address: u64
Address (EIP) of this instruction.
size: u16
Size of this instruction.
bytes: Vec<u8>
Machine bytes of this instruction.
mnemonic: String
Ascii text of instruction mnemonic.
op_str: String
Ascii text of instruction operands.
detail: Option<Details>
Detail of this instuction.
Methods
impl Instr
[src]
pub fn new(instr: &cs_insn, decode_detail: bool, arch: cs_arch) -> Instr
[src]
Create an Instr
from a cs_insn.