[−][src]Trait unicorn::Cpu
Associated Types
Loading content...Required methods
Loading content...Provided methods
fn reg_read(&self, reg: Self::Reg) -> Result<u64, Error>
Read an unsigned value from a register.
fn reg_read_i32(&self, reg: Self::Reg) -> Result<i32, Error>
Read a signed 32-bit value from a register.
unsafe fn reg_write_generic<T: Sized>(
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
Write a generic type to a register.
fn reg_write(&self, reg: Self::Reg, value: u64) -> Result<(), Error>
Write an unsigned value register.
fn reg_write_i32(&self, reg: Self::Reg, value: i32) -> Result<(), Error>
Write a signed 32-bit value to a register.
fn mem_map(
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
Map a memory region in the emulator at the specified address.
address
must be aligned to 4kb or this will return Error::ARG
.
size
must be a multiple of 4kb or this will return Error::ARG
.
unsafe fn mem_map_ptr<T>(
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
Map an existing memory region in the emulator at the specified address.
This function is marked unsafe because it is the responsibility of the caller to
ensure that size
matches the size of the passed buffer, an invalid size
value will
likely cause a crash in unicorn.
address
must be aligned to 4kb or this will return Error::ARG
.
size
must be a multiple of 4kb or this will return Error::ARG
.
ptr
is a pointer to the provided memory region that will be used by the emulator.
fn mem_unmap(&self, address: u64, size: size_t) -> Result<(), Error>
Unmap a memory region.
address
must be aligned to 4kb or this will return Error::ARG
.
size
must be a multiple of 4kb or this will return Error::ARG
.
fn mem_write(&self, address: u64, bytes: &[u8]) -> Result<(), Error>
Write a range of bytes to memory at the specified address.
fn mem_read(&self, address: u64, bytes: &mut [u8]) -> Result<(), Error>
Read a range of bytes from memory at the specified address.
fn mem_read_as_vec(&self, address: u64, size: usize) -> Result<Vec<u8>, Error>
Read a range of bytes from memory at the specified address; return the bytes read as a
Vec
.
fn mem_protect(
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
Set the memory permissions for an existing memory region.
address
must be aligned to 4kb or this will return Error::ARG
.
size
must be a multiple of 4kb or this will return Error::ARG
.
fn mem_regions(&self) -> Result<Vec<MemRegion>, Error>
Returns a vector with the memory regions that are mapped in the emulator.
fn emu_start(
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
Emulate machine code for a specified duration.
begin
is the address where to start the emulation. The emulation stops if until
is hit. timeout
specifies a duration in microseconds after which the emulation is
stopped (infinite execution if set to 0). count
is the maximum number of instructions
to emulate (emulate all the available instructions if set to 0).
fn emu_stop(&self) -> Result<(), Error>
Stop the emulation.
This is usually called from callback function in hooks. NOTE: For now, this will stop the execution only after the current block.
fn add_code_hook<F>(
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
Add a code hook.
fn add_intr_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32) + 'static,
F: Fn(&Unicorn, u32) + 'static,
Add an interrupt hook.
fn add_mem_hook<F>(
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
Add a memory hook.
fn add_insn_in_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
Add an "in" instruction hook.
fn add_insn_out_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize, u32) + 'static,
F: Fn(&Unicorn, u32, usize, u32) + 'static,
Add an "out" instruction hook.
fn add_insn_sys_hook<F>(
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
Add a "syscall" or "sysenter" instruction hook.
fn remove_hook(&mut self, hook: uc_hook) -> Result<(), Error>
Remove a hook.
hook
is the value returned by either add_code_hook
or add_mem_hook
.
fn errno(&self) -> Error
Return the last error code when an API function failed.
Like glibc errno(), this function might not retain its old value once accessed.
fn query(&self, query: Query) -> Result<usize, Error>
Query the internal status of the engine.
Supported queries :
Query::PAGE_SIZE
: the page size used by the emulator.Query::MODE
: the current hardware mode.
fn context_save(&self) -> Result<Context, Error>
Save the CPU context into an opaque struct.
fn context_restore(&self, context: &Context) -> Result<(), Error>
Implementors
impl Cpu for CpuARM
[src]
type Reg = RegisterARM
fn emu(&self) -> &Unicorn
[src]
fn mut_emu(&mut self) -> &mut Unicorn
[src]
fn reg_read(&self, reg: Self::Reg) -> Result<u64, Error>
[src]
fn reg_read_i32(&self, reg: Self::Reg) -> Result<i32, Error>
[src]
unsafe fn reg_write_generic<T: Sized>(
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
[src]
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
fn reg_write(&self, reg: Self::Reg, value: u64) -> Result<(), Error>
[src]
fn reg_write_i32(&self, reg: Self::Reg, value: i32) -> Result<(), Error>
[src]
fn mem_map(
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
unsafe fn mem_map_ptr<T>(
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
fn mem_unmap(&self, address: u64, size: size_t) -> Result<(), Error>
[src]
fn mem_write(&self, address: u64, bytes: &[u8]) -> Result<(), Error>
[src]
fn mem_read(&self, address: u64, bytes: &mut [u8]) -> Result<(), Error>
[src]
fn mem_read_as_vec(&self, address: u64, size: usize) -> Result<Vec<u8>, Error>
[src]
fn mem_protect(
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
fn mem_regions(&self) -> Result<Vec<MemRegion>, Error>
[src]
fn emu_start(
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
[src]
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
fn emu_stop(&self) -> Result<(), Error>
[src]
fn add_code_hook<F>(
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
[src]
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
fn add_intr_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32) + 'static,
[src]
F: Fn(&Unicorn, u32) + 'static,
fn add_mem_hook<F>(
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
[src]
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
fn add_insn_in_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
[src]
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
fn add_insn_out_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize, u32) + 'static,
[src]
F: Fn(&Unicorn, u32, usize, u32) + 'static,
fn add_insn_sys_hook<F>(
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
[src]
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
fn remove_hook(&mut self, hook: uc_hook) -> Result<(), Error>
[src]
fn errno(&self) -> Error
[src]
fn query(&self, query: Query) -> Result<usize, Error>
[src]
fn context_save(&self) -> Result<Context, Error>
[src]
fn context_restore(&self, context: &Context) -> Result<(), Error>
[src]
impl Cpu for CpuARM64
[src]
type Reg = RegisterARM64
fn emu(&self) -> &Unicorn
[src]
fn mut_emu(&mut self) -> &mut Unicorn
[src]
fn reg_read(&self, reg: Self::Reg) -> Result<u64, Error>
[src]
fn reg_read_i32(&self, reg: Self::Reg) -> Result<i32, Error>
[src]
unsafe fn reg_write_generic<T: Sized>(
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
[src]
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
fn reg_write(&self, reg: Self::Reg, value: u64) -> Result<(), Error>
[src]
fn reg_write_i32(&self, reg: Self::Reg, value: i32) -> Result<(), Error>
[src]
fn mem_map(
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
unsafe fn mem_map_ptr<T>(
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
fn mem_unmap(&self, address: u64, size: size_t) -> Result<(), Error>
[src]
fn mem_write(&self, address: u64, bytes: &[u8]) -> Result<(), Error>
[src]
fn mem_read(&self, address: u64, bytes: &mut [u8]) -> Result<(), Error>
[src]
fn mem_read_as_vec(&self, address: u64, size: usize) -> Result<Vec<u8>, Error>
[src]
fn mem_protect(
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
fn mem_regions(&self) -> Result<Vec<MemRegion>, Error>
[src]
fn emu_start(
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
[src]
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
fn emu_stop(&self) -> Result<(), Error>
[src]
fn add_code_hook<F>(
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
[src]
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
fn add_intr_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32) + 'static,
[src]
F: Fn(&Unicorn, u32) + 'static,
fn add_mem_hook<F>(
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
[src]
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
fn add_insn_in_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
[src]
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
fn add_insn_out_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize, u32) + 'static,
[src]
F: Fn(&Unicorn, u32, usize, u32) + 'static,
fn add_insn_sys_hook<F>(
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
[src]
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
fn remove_hook(&mut self, hook: uc_hook) -> Result<(), Error>
[src]
fn errno(&self) -> Error
[src]
fn query(&self, query: Query) -> Result<usize, Error>
[src]
fn context_save(&self) -> Result<Context, Error>
[src]
fn context_restore(&self, context: &Context) -> Result<(), Error>
[src]
impl Cpu for CpuM68K
[src]
type Reg = RegisterM68K
fn emu(&self) -> &Unicorn
[src]
fn mut_emu(&mut self) -> &mut Unicorn
[src]
fn reg_read(&self, reg: Self::Reg) -> Result<u64, Error>
[src]
fn reg_read_i32(&self, reg: Self::Reg) -> Result<i32, Error>
[src]
unsafe fn reg_write_generic<T: Sized>(
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
[src]
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
fn reg_write(&self, reg: Self::Reg, value: u64) -> Result<(), Error>
[src]
fn reg_write_i32(&self, reg: Self::Reg, value: i32) -> Result<(), Error>
[src]
fn mem_map(
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
unsafe fn mem_map_ptr<T>(
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
fn mem_unmap(&self, address: u64, size: size_t) -> Result<(), Error>
[src]
fn mem_write(&self, address: u64, bytes: &[u8]) -> Result<(), Error>
[src]
fn mem_read(&self, address: u64, bytes: &mut [u8]) -> Result<(), Error>
[src]
fn mem_read_as_vec(&self, address: u64, size: usize) -> Result<Vec<u8>, Error>
[src]
fn mem_protect(
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
fn mem_regions(&self) -> Result<Vec<MemRegion>, Error>
[src]
fn emu_start(
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
[src]
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
fn emu_stop(&self) -> Result<(), Error>
[src]
fn add_code_hook<F>(
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
[src]
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
fn add_intr_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32) + 'static,
[src]
F: Fn(&Unicorn, u32) + 'static,
fn add_mem_hook<F>(
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
[src]
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
fn add_insn_in_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
[src]
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
fn add_insn_out_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize, u32) + 'static,
[src]
F: Fn(&Unicorn, u32, usize, u32) + 'static,
fn add_insn_sys_hook<F>(
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
[src]
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
fn remove_hook(&mut self, hook: uc_hook) -> Result<(), Error>
[src]
fn errno(&self) -> Error
[src]
fn query(&self, query: Query) -> Result<usize, Error>
[src]
fn context_save(&self) -> Result<Context, Error>
[src]
fn context_restore(&self, context: &Context) -> Result<(), Error>
[src]
impl Cpu for CpuMIPS
[src]
type Reg = RegisterMIPS
fn emu(&self) -> &Unicorn
[src]
fn mut_emu(&mut self) -> &mut Unicorn
[src]
fn reg_read(&self, reg: Self::Reg) -> Result<u64, Error>
[src]
fn reg_read_i32(&self, reg: Self::Reg) -> Result<i32, Error>
[src]
unsafe fn reg_write_generic<T: Sized>(
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
[src]
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
fn reg_write(&self, reg: Self::Reg, value: u64) -> Result<(), Error>
[src]
fn reg_write_i32(&self, reg: Self::Reg, value: i32) -> Result<(), Error>
[src]
fn mem_map(
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
unsafe fn mem_map_ptr<T>(
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
fn mem_unmap(&self, address: u64, size: size_t) -> Result<(), Error>
[src]
fn mem_write(&self, address: u64, bytes: &[u8]) -> Result<(), Error>
[src]
fn mem_read(&self, address: u64, bytes: &mut [u8]) -> Result<(), Error>
[src]
fn mem_read_as_vec(&self, address: u64, size: usize) -> Result<Vec<u8>, Error>
[src]
fn mem_protect(
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
fn mem_regions(&self) -> Result<Vec<MemRegion>, Error>
[src]
fn emu_start(
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
[src]
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
fn emu_stop(&self) -> Result<(), Error>
[src]
fn add_code_hook<F>(
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
[src]
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
fn add_intr_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32) + 'static,
[src]
F: Fn(&Unicorn, u32) + 'static,
fn add_mem_hook<F>(
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
[src]
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
fn add_insn_in_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
[src]
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
fn add_insn_out_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize, u32) + 'static,
[src]
F: Fn(&Unicorn, u32, usize, u32) + 'static,
fn add_insn_sys_hook<F>(
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
[src]
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
fn remove_hook(&mut self, hook: uc_hook) -> Result<(), Error>
[src]
fn errno(&self) -> Error
[src]
fn query(&self, query: Query) -> Result<usize, Error>
[src]
fn context_save(&self) -> Result<Context, Error>
[src]
fn context_restore(&self, context: &Context) -> Result<(), Error>
[src]
impl Cpu for CpuSPARC
[src]
type Reg = RegisterSPARC
fn emu(&self) -> &Unicorn
[src]
fn mut_emu(&mut self) -> &mut Unicorn
[src]
fn reg_read(&self, reg: Self::Reg) -> Result<u64, Error>
[src]
fn reg_read_i32(&self, reg: Self::Reg) -> Result<i32, Error>
[src]
unsafe fn reg_write_generic<T: Sized>(
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
[src]
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
fn reg_write(&self, reg: Self::Reg, value: u64) -> Result<(), Error>
[src]
fn reg_write_i32(&self, reg: Self::Reg, value: i32) -> Result<(), Error>
[src]
fn mem_map(
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
unsafe fn mem_map_ptr<T>(
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
fn mem_unmap(&self, address: u64, size: size_t) -> Result<(), Error>
[src]
fn mem_write(&self, address: u64, bytes: &[u8]) -> Result<(), Error>
[src]
fn mem_read(&self, address: u64, bytes: &mut [u8]) -> Result<(), Error>
[src]
fn mem_read_as_vec(&self, address: u64, size: usize) -> Result<Vec<u8>, Error>
[src]
fn mem_protect(
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
fn mem_regions(&self) -> Result<Vec<MemRegion>, Error>
[src]
fn emu_start(
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
[src]
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
fn emu_stop(&self) -> Result<(), Error>
[src]
fn add_code_hook<F>(
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
[src]
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
fn add_intr_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32) + 'static,
[src]
F: Fn(&Unicorn, u32) + 'static,
fn add_mem_hook<F>(
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
[src]
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
fn add_insn_in_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
[src]
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
fn add_insn_out_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize, u32) + 'static,
[src]
F: Fn(&Unicorn, u32, usize, u32) + 'static,
fn add_insn_sys_hook<F>(
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
[src]
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
fn remove_hook(&mut self, hook: uc_hook) -> Result<(), Error>
[src]
fn errno(&self) -> Error
[src]
fn query(&self, query: Query) -> Result<usize, Error>
[src]
fn context_save(&self) -> Result<Context, Error>
[src]
fn context_restore(&self, context: &Context) -> Result<(), Error>
[src]
impl Cpu for CpuX86
[src]
type Reg = RegisterX86
fn emu(&self) -> &Unicorn
[src]
fn mut_emu(&mut self) -> &mut Unicorn
[src]
fn reg_read(&self, reg: Self::Reg) -> Result<u64, Error>
[src]
fn reg_read_i32(&self, reg: Self::Reg) -> Result<i32, Error>
[src]
unsafe fn reg_write_generic<T: Sized>(
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
[src]
&self,
reg: Self::Reg,
value: T
) -> Result<(), Error>
fn reg_write(&self, reg: Self::Reg, value: u64) -> Result<(), Error>
[src]
fn reg_write_i32(&self, reg: Self::Reg, value: i32) -> Result<(), Error>
[src]
fn mem_map(
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection
) -> Result<(), Error>
unsafe fn mem_map_ptr<T>(
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
[src]
&self,
address: u64,
size: size_t,
perms: Protection,
ptr: *mut T
) -> Result<(), Error>
fn mem_unmap(&self, address: u64, size: size_t) -> Result<(), Error>
[src]
fn mem_write(&self, address: u64, bytes: &[u8]) -> Result<(), Error>
[src]
fn mem_read(&self, address: u64, bytes: &mut [u8]) -> Result<(), Error>
[src]
fn mem_read_as_vec(&self, address: u64, size: usize) -> Result<Vec<u8>, Error>
[src]
fn mem_protect(
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
[src]
&self,
address: u64,
size: usize,
perms: Protection
) -> Result<(), Error>
fn mem_regions(&self) -> Result<Vec<MemRegion>, Error>
[src]
fn emu_start(
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
[src]
&self,
begin: u64,
until: u64,
timeout: u64,
count: usize
) -> Result<(), Error>
fn emu_stop(&self) -> Result<(), Error>
[src]
fn add_code_hook<F>(
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
[src]
&mut self,
hook_type: CodeHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u64, u32) + 'static,
fn add_intr_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32) + 'static,
[src]
F: Fn(&Unicorn, u32) + 'static,
fn add_mem_hook<F>(
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
[src]
&mut self,
hook_type: MemHookType,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, MemType, u64, usize, i64) -> bool + 'static,
fn add_insn_in_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
[src]
F: Fn(&Unicorn, u32, usize) -> u32 + 'static,
fn add_insn_out_hook<F>(&mut self, callback: F) -> Result<uc_hook, Error> where
F: Fn(&Unicorn, u32, usize, u32) + 'static,
[src]
F: Fn(&Unicorn, u32, usize, u32) + 'static,
fn add_insn_sys_hook<F>(
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,
[src]
&mut self,
insn_type: InsnSysX86,
begin: u64,
end: u64,
callback: F
) -> Result<uc_hook, Error> where
F: Fn(&Unicorn) + 'static,