Struct capstone_rust::capstone::Details [] [src]

pub struct Details {
    pub regs_read: Vec<u32>,
    pub regs_write: Vec<u32>,
    pub groups: Vec<u32>,
    pub arch: DetailsArch,
}

Details of an instruction.

If CS_OPT_DETAIL is on, Instr.detail will be filled with this struct, that you can use to get some details of an instruction (e.g. registers read, modified, ...).

Examples

use capstone_rust::capstone as cs;
let code = vec![0x01, 0xc3]; // add ebx, eax

let dec = cs::Capstone::new(cs::cs_arch::CS_ARCH_X86, cs::cs_mode::CS_MODE_32).unwrap();
dec.option(cs::cs_opt_type::CS_OPT_DETAIL, cs::cs_opt_value::CS_OPT_ON).unwrap();

let buf = dec.disasm(code.as_slice(), 0, 0).unwrap();
let detail = buf.get(0).unwrap().detail.unwrap(); // `buf` contains only one 'add'.
assert_eq!(dec.reg_name(detail.regs_write[0]), Some("eflags"));

Fields

List of implicit registers read by this insn.

List of implicit registers modified by this insn.

List of group this instruction belong to.

Architecture-specific details.

Trait Implementations

impl Debug for Details
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Details

impl Sync for Details