pub struct Instruction {
pub address: Option<u64>,
pub call_target: Vec<u64>,
pub mnemonic_index: Option<i32>,
pub operand_index: Vec<i32>,
pub raw_bytes: Option<Vec<u8>>,
pub comment_index: Vec<i32>,
}Fields§
§address: Option<u64>This will only be filled for instructions that do not just flow from the immediately preceding instruction. Regular instructions will have to calculate their own address by adding raw_bytes.size() to the previous instruction’s address.
call_target: Vec<u64>If this is a call instruction and call targets could be determined they’ll be given here. Note that we may or may not have a flow graph for the target and thus cannot use an index into the flow graph table here. We could potentially use call graph nodes, but linking instructions to the call graph directly does not seem a good choice.
mnemonic_index: Option<i32>Index into the mnemonic array of strings. Used for de-duping the data. The default value is used for the most common mnemonic in the executable.
operand_index: Vec<i32>Indices into the operand tree. On X86 this can be 0, 1 or 2 elements long, 3 elements with VEX/EVEX. Implicit: operand sequence
raw_bytes: Option<Vec<u8>>The unmodified input bytes corresponding to this instruction.
comment_index: Vec<i32>Implicit: comment sequence
Implementations§
Source§impl Instruction
impl Instruction
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl Default for Instruction
impl Default for Instruction
Source§impl Message for Instruction
impl Message for Instruction
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.