MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / with_uc_ptr

Method with_uc_ptr

icicle-cortexm/src/lib.rs:47–60  ·  view source on GitHub ↗
(
        &mut self,
        vm: &mut icicle_vm::Vm,
        handler: impl FnOnce(*mut uc_engine) -> R,
    )

Source from the content-addressed store, hash-verified

45 }
46
47 fn with_uc_ptr<R>(
48 &mut self,
49 vm: &mut icicle_vm::Vm,
50 handler: impl FnOnce(*mut uc_engine) -> R,
51 ) -> R {
52 self.ctx.as_mut().unwrap().get_mut().vm = vm;
53
54 let result = unsafe {
55 let uc_ptr = self.ctx.as_mut().unwrap().get_mut().uc_ptr();
56 handler(uc_ptr)
57 };
58
59 result
60 }
61
62 pub fn get_mmio_handler<'a>(&self, vm: &'a mut icicle_vm::Vm) -> Option<&'a mut T>
63 where

Callers 1

runMethod · 0.80

Calls 2

get_mutMethod · 0.80
uc_ptrMethod · 0.80

Tested by

no test coverage detected