[−][src]Struct xori::disasm::Xori
Fields
arch: Arch
mode: Mode
Methods
impl Xori
[src]
impl Xori
pub fn disasm(
&self,
_code: &[u8],
_size: usize,
_address: usize,
_offset: usize,
_chunk: usize,
_instr: &mut Vec<Instruction<X86Detail>>
) -> bool
[src]
pub fn disasm(
&self,
_code: &[u8],
_size: usize,
_address: usize,
_offset: usize,
_chunk: usize,
_instr: &mut Vec<Instruction<X86Detail>>
) -> bool
Set up the architecture type for the disassembler type and prepares the returned instruction container.
Example:
ⓘThis example is not tested
let xi = Xori { arch: Arch::ArchX86, mode: Mode::Mode32 }; let binary32 = b"\xe9\x1e\x00\x00\x00\xb8\x04\ \x00\x00\x00\xbb\x01\x00\x00\x00\x59\xba\x0f\ \x00\x00\x00\xcd\x80\xb8\x01\x00\x00\x00\xbb\ \x00\x00\x00\x00\xcd\x80\xe8\xdd\xff\xff\xff\ \x48\x65\x6c\x6c\x6f\x2c\x20\x57\x6f\x72\x6c\ \x64\x21\x0d\x0a"; let mut vec: Vec<Instruction<X86Detail>> = Vec::new(); let start_address = 0x1000; xi.disasm(binary32, binary32.len(), start_address, start_address, 0, &mut vec); if vec.len() > 0 { for instr in vec.iter_mut() { let addr: String = format!("0x{:x}", instr.address); println!("{:16}{} {}", addr, instr.mnemonic, instr.op_str); } }
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
🔬 This is a nightly-only experimental API. (
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
🔬 This is a nightly-only experimental API. (
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more