Skip to content

Commit 0068041

Browse files
committed
feat: Add start and end address to rust block hook binding
1 parent 24f898f commit 0068041

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bindings/rust/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,8 @@ impl<'a, D> Unicorn<'a, D> {
620620
/// Add a block hook.
621621
pub fn add_block_hook<F: 'a>(
622622
&mut self,
623+
begin: u64,
624+
end: u64,
623625
callback: F,
624626
) -> Result<UcHookId, uc_error>
625627
where
@@ -638,8 +640,8 @@ impl<'a, D> Unicorn<'a, D> {
638640
HookType::BLOCK,
639641
ffi::block_hook_proxy::<D, F> as _,
640642
user_data.as_mut() as *mut _ as _,
641-
1,
642-
0,
643+
begin,
644+
end,
643645
)
644646
}
645647
.and_then(|| {

0 commit comments

Comments
 (0)