Merge pull request #1928 from mlgiraud/feat/add_start_end_to_hook

Feature: Bindings: add start end to block hook
This commit is contained in:
2024-03-11 19:50:46 +08:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

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