[][src]Struct falcon::translator::BlockTranslationResult

pub struct BlockTranslationResult { /* fields omitted */ }

The result of translating a block from a native architecture.

Native blocks translated to ControlFlowGraph

While a block on the native architecture may be a linear sequence of instructions, when lifted this block may actually contain loops, conditionally executed instructions, and a host of other oddness. Translators therefor return a ControlFlowGraph for the translation of a block. The entry and exit for this ControlFlowGraph should be set.

Methods

impl BlockTranslationResult[src]

pub fn new(
    instructions: Vec<(u64, ControlFlowGraph)>,
    address: u64,
    length: usize,
    successors: Vec<(u64, Option<Expression>)>
) -> BlockTranslationResult
[src]

Create a new BlockTranslationResult.

Parameters

  • instructions - A Vec of address/ControlFlowGraph pairs, one per instruction.
  • address - The address where this block was lifted.
  • length - The length of the block in bytes.
  • successors - Tuples of addresses and optional conditions for successors to this block.

pub fn instructions(&self) -> &Vec<(u64, ControlFlowGraph)>[src]

Get the ControlFlowGraph for this BlockTranslationResult

pub fn address(&self) -> u64[src]

Get the address wherefrom this block was translated.

pub fn length(&self) -> usize[src]

Get the length of this block in bytes.

pub fn successors(&self) -> &Vec<(u64, Option<Expression>)>[src]

Get the successors for this block.

pub fn blockify(&self) -> Result<ControlFlowGraph>[src]

Return a single ControlFlowGraph for this block

Trait Implementations

impl Clone for BlockTranslationResult[src]

impl Debug for BlockTranslationResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.