trait EvalContextExtPriv<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn call_native_raw(
&mut self,
fun: CodePtr,
args: &mut [OwnedArg],
ret: (FfiType, Size),
) -> InterpResult<'tcx, (Box<[u8]>, 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 ffi_ret_to_mem(
&mut self,
v: Box<[u8]>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
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,
layout: TyAndLayout<'tcx>,
) -> InterpResult<'tcx, FfiType> { ... }
}Provided Methods§
Sourcefn call_native_raw(
&mut self,
fun: CodePtr,
args: &mut [OwnedArg],
ret: (FfiType, Size),
) -> InterpResult<'tcx, (Box<[u8]>, Option<MemEvents>)>
fn call_native_raw( &mut self, fun: CodePtr, args: &mut [OwnedArg], ret: (FfiType, Size), ) -> InterpResult<'tcx, (Box<[u8]>, Option<MemEvents>)>
Call native host function and return the output and the memory accesses that occurred during the call.
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.
fn ffi_ret_to_mem( &mut self, v: Box<[u8]>, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
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,
layout: TyAndLayout<'tcx>,
) -> InterpResult<'tcx, FfiType>
fn ty_to_ffitype( &self, layout: TyAndLayout<'tcx>, ) -> InterpResult<'tcx, FfiType>
Gets the matching libffi type for a given Ty.