[][src]Trait p8n_types::Architecture

pub trait Architecture: Clone {
    type Configuration: Clone + Send;
    fn prepare(
        _: &Region,
        _: &Self::Configuration
    ) -> Result<Cow<'static, [(&'static str, u64, &'static str)]>>;
fn decode(
        _: &Region,
        _: u64,
        _: &Self::Configuration,
        names: &mut Names,
        segments: &mut Segments,
        strings: &mut Strings,
        matches: &mut Vec<Match>
    ) -> Result<()>; }

CPU architecture and instruction set.

Associated Types

type Configuration: Clone + Send

This type can describes the CPU state. For x86 this would be the mode, for ARM whenever Thumb is active.

Loading content...

Required methods

fn prepare(
    _: &Region,
    _: &Self::Configuration
) -> Result<Cow<'static, [(&'static str, u64, &'static str)]>>

Given a memory image and a configuration the functions extracts a set of entry points.

Return

Tuples of entry point name, offset form the start of the region and optional comment.

fn decode(
    _: &Region,
    _: u64,
    _: &Self::Configuration,
    names: &mut Names,
    segments: &mut Segments,
    strings: &mut Strings,
    matches: &mut Vec<Match>
) -> Result<()>

Start to disassemble a single Opcode inside a given region at a given address.

Loading content...

Implementors

impl Architecture for TestArch[src]

type Configuration = ()

Loading content...