Refactor: Use InvokeContext in all Syscalls (#21545)

* Adds ComputeMeter::mock_set_remaining().

* Adds InvokeContext::get_loader()

* Adds a LogCollector to InvokeContext::new_mock().

* Adds "invoke_context: Rc<RefCell<&'a mut dyn InvokeContext>>,"
to all SyscallObjects.

* Adds LogCollector::get_recorded_content().

* Removes loader_id parameter from bind_syscall_context_objects() and create_vm().
This commit is contained in:
Alexander Meißner
2021-12-02 08:58:02 +01:00
committed by GitHub
parent 9079de825b
commit 6330cbcf33
7 changed files with 863 additions and 557 deletions

View File

@ -269,9 +269,7 @@ native machine code before execting it in the virtual machine.",
_ => {}
}
let id = bpf_loader::id();
let mut vm = create_vm(
&id,
&executable,
parameter_bytes.as_slice_mut(),
&mut invoke_context,