trait EvalContextExtPriv<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn call_native_with_args(
&mut self,
link_name: Symbol,
dest: &MPlaceTy<'tcx>,
fun: CodePtr,
libffi_args: &mut [OwnedArg],
) -> InterpResult<'tcx, (ImmTy<'tcx>, Option<MemEvents>)> { ... }
fn get_func_ptr_explicitly_from_lib(
&mut self,
link_name: Symbol,
) -> Option<CodePtr> { ... }
fn tracing_apply_accesses(
&mut self,
events: MemEvents,
) -> InterpResult<'tcx> { ... }
fn op_to_ffi_arg(
&self,
v: &OpTy<'tcx>,
tracing: bool,
) -> InterpResult<'tcx, OwnedArg> { ... }
fn adt_to_ffitype(
&self,
orig_ty: Ty<'_>,
adt_def: AdtDef<'tcx>,
args: &'tcx List<GenericArg<'tcx>>,
) -> InterpResult<'tcx, FfiType> { ... }
fn ty_to_ffitype(&self, ty: Ty<'tcx>) -> InterpResult<'tcx, FfiType> { ... }
}
Provided Methods§
Sourcefn call_native_with_args(
&mut self,
link_name: Symbol,
dest: &MPlaceTy<'tcx>,
fun: CodePtr,
libffi_args: &mut [OwnedArg],
) -> InterpResult<'tcx, (ImmTy<'tcx>, Option<MemEvents>)>
fn call_native_with_args( &mut self, link_name: Symbol, dest: &MPlaceTy<'tcx>, fun: CodePtr, libffi_args: &mut [OwnedArg], ) -> InterpResult<'tcx, (ImmTy<'tcx>, Option<MemEvents>)>
Call native host function and return the output as an immediate.
Sourcefn get_func_ptr_explicitly_from_lib(
&mut self,
link_name: Symbol,
) -> Option<CodePtr>
fn get_func_ptr_explicitly_from_lib( &mut self, link_name: Symbol, ) -> Option<CodePtr>
Get the pointer to the function of the specified name in the shared object file, if it exists. The function must be in one of the shared object files specified: we do not return pointers to functions in dependencies of libraries.
Sourcefn tracing_apply_accesses(&mut self, events: MemEvents) -> InterpResult<'tcx>
fn tracing_apply_accesses(&mut self, events: MemEvents) -> InterpResult<'tcx>
Applies the events
to Miri’s internal state. The event vector must be
ordered sequentially by when the accesses happened, and the sizes are
assumed to be exact.
Sourcefn op_to_ffi_arg(
&self,
v: &OpTy<'tcx>,
tracing: bool,
) -> InterpResult<'tcx, OwnedArg>
fn op_to_ffi_arg( &self, v: &OpTy<'tcx>, tracing: bool, ) -> InterpResult<'tcx, OwnedArg>
Extract the value from the result of reading an operand from the machine
and convert it to a OwnedArg
.
Sourcefn adt_to_ffitype(
&self,
orig_ty: Ty<'_>,
adt_def: AdtDef<'tcx>,
args: &'tcx List<GenericArg<'tcx>>,
) -> InterpResult<'tcx, FfiType>
fn adt_to_ffitype( &self, orig_ty: Ty<'_>, adt_def: AdtDef<'tcx>, args: &'tcx List<GenericArg<'tcx>>, ) -> InterpResult<'tcx, FfiType>
Parses an ADT to construct the matching libffi type.
Sourcefn ty_to_ffitype(&self, ty: Ty<'tcx>) -> InterpResult<'tcx, FfiType>
fn ty_to_ffitype(&self, ty: Ty<'tcx>) -> InterpResult<'tcx, FfiType>
Gets the matching libffi type for a given Ty.