Trait miri::shims::foreign_items::EvalContextExt
source · pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
// Provided methods
fn emulate_foreign_item(
&mut self,
link_name: Symbol,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: UnwindAction
) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>> { ... }
fn emulate_dyn_sym(
&mut self,
sym: DynSym,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: UnwindAction
) -> InterpResult<'tcx> { ... }
fn lookup_exported_symbol(
&mut self,
link_name: Symbol
) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>> { ... }
fn malloc(
&mut self,
size: u64,
zero_init: bool,
kind: MiriMemoryKind
) -> InterpResult<'tcx, Pointer<Option<Provenance>>> { ... }
fn free(
&mut self,
ptr: Pointer<Option<Provenance>>,
kind: MiriMemoryKind
) -> InterpResult<'tcx> { ... }
fn realloc(
&mut self,
old_ptr: Pointer<Option<Provenance>>,
new_size: u64,
kind: MiriMemoryKind
) -> InterpResult<'tcx, Pointer<Option<Provenance>>> { ... }
}
Provided Methods§
sourcefn emulate_foreign_item(
&mut self,
link_name: Symbol,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: UnwindAction
) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>>
fn emulate_foreign_item( &mut self, link_name: Symbol, abi: Abi, args: &[OpTy<'tcx, Provenance>], dest: &PlaceTy<'tcx, Provenance>, ret: Option<BasicBlock>, unwind: UnwindAction ) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>>
Emulates calling a foreign item, failing if the item is not supported.
This function will handle goto_block
if needed.
Returns Ok(None) if the foreign item was completely handled
by this function.
Returns Ok(Some(body)) if processing the foreign item
is delegated to another function.
sourcefn emulate_dyn_sym(
&mut self,
sym: DynSym,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: UnwindAction
) -> InterpResult<'tcx>
fn emulate_dyn_sym( &mut self, sym: DynSym, abi: Abi, args: &[OpTy<'tcx, Provenance>], dest: &PlaceTy<'tcx, Provenance>, ret: Option<BasicBlock>, unwind: UnwindAction ) -> InterpResult<'tcx>
Emulates a call to a DynSym
.
sourcefn lookup_exported_symbol(
&mut self,
link_name: Symbol
) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>>
fn lookup_exported_symbol( &mut self, link_name: Symbol ) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>>
Lookup the body of a function that has link_name
as the symbol name.