| 18 | type uc_err = fuzzware::uc_err::Type; |
| 19 | |
| 20 | pub struct Context { |
| 21 | /// Pointer to the VM, can be null. |
| 22 | pub vm: *mut Vm, |
| 23 | |
| 24 | /// The vtable passed to C code to allow it to call emulator APIs. |
| 25 | pub vtable: Option<Box<fuzzware::uc_engine>>, |
| 26 | |
| 27 | /// A reference to the block based timer. |
| 28 | pub timer: Option<BlockTimerRef>, |
| 29 | |
| 30 | /// A handle to the input handler. |
| 31 | pub io_handle: Option<IoHandler>, |
| 32 | |
| 33 | /// A mapping from Unicorn register indices to VarNodes allocated the associated registers. |
| 34 | pub uc_vars: Vec<pcode::VarNode>, |
| 35 | } |
| 36 | |
| 37 | impl Context { |
| 38 | pub fn new(vm: &mut Vm) -> anyhow::Result<Self> { |
nothing calls this directly
no outgoing calls
no test coverage detected