feat: Add start and end address to rust block hook binding

This commit is contained in:
Mark Giraud
2024-02-26 11:20:27 +01:00
parent 24f898fb58
commit 00680412d3

View File

@@ -620,6 +620,8 @@ impl<'a, D> Unicorn<'a, D> {
/// Add a block hook. /// Add a block hook.
pub fn add_block_hook<F: 'a>( pub fn add_block_hook<F: 'a>(
&mut self, &mut self,
begin: u64,
end: u64,
callback: F, callback: F,
) -> Result<UcHookId, uc_error> ) -> Result<UcHookId, uc_error>
where where
@@ -638,8 +640,8 @@ impl<'a, D> Unicorn<'a, D> {
HookType::BLOCK, HookType::BLOCK,
ffi::block_hook_proxy::<D, F> as _, ffi::block_hook_proxy::<D, F> as _,
user_data.as_mut() as *mut _ as _, user_data.as_mut() as *mut _ as _,
1, begin,
0, end,
) )
} }
.and_then(|| { .and_then(|| {