pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
Show 28 methods
// Provided methods
fn open(
&mut self,
args: &[OpTy<'tcx, Provenance>]
) -> InterpResult<'tcx, i32> { ... }
fn fcntl(
&mut self,
args: &[OpTy<'tcx, Provenance>]
) -> InterpResult<'tcx, i32> { ... }
fn close(
&mut self,
fd_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn handle_not_found<T: From<i32>>(&mut self) -> InterpResult<'tcx, T> { ... }
fn read(
&mut self,
fd: i32,
buf: Pointer<Option<Provenance>>,
count: u64
) -> InterpResult<'tcx, i64> { ... }
fn write(
&mut self,
fd: i32,
buf: Pointer<Option<Provenance>>,
count: u64
) -> InterpResult<'tcx, i64> { ... }
fn lseek64(
&mut self,
fd_op: &OpTy<'tcx, Provenance>,
offset_op: &OpTy<'tcx, Provenance>,
whence_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn unlink(
&mut self,
path_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn symlink(
&mut self,
target_op: &OpTy<'tcx, Provenance>,
linkpath_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn macos_stat(
&mut self,
path_op: &OpTy<'tcx, Provenance>,
buf_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn macos_lstat(
&mut self,
path_op: &OpTy<'tcx, Provenance>,
buf_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn macos_fstat(
&mut self,
fd_op: &OpTy<'tcx, Provenance>,
buf_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn linux_statx(
&mut self,
dirfd_op: &OpTy<'tcx, Provenance>,
pathname_op: &OpTy<'tcx, Provenance>,
flags_op: &OpTy<'tcx, Provenance>,
mask_op: &OpTy<'tcx, Provenance>,
statxbuf_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn rename(
&mut self,
oldpath_op: &OpTy<'tcx, Provenance>,
newpath_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn mkdir(
&mut self,
path_op: &OpTy<'tcx, Provenance>,
mode_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn rmdir(
&mut self,
path_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn opendir(
&mut self,
name_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn linux_readdir64(
&mut self,
dirp_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn macos_readdir_r(
&mut self,
dirp_op: &OpTy<'tcx, Provenance>,
entry_op: &OpTy<'tcx, Provenance>,
result_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn closedir(
&mut self,
dirp_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn ftruncate64(
&mut self,
fd_op: &OpTy<'tcx, Provenance>,
length_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn fsync(
&mut self,
fd_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn fdatasync(
&mut self,
fd_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
fn sync_file_range(
&mut self,
fd_op: &OpTy<'tcx, Provenance>,
offset_op: &OpTy<'tcx, Provenance>,
nbytes_op: &OpTy<'tcx, Provenance>,
flags_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn readlink(
&mut self,
pathname_op: &OpTy<'tcx, Provenance>,
buf_op: &OpTy<'tcx, Provenance>,
bufsize_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i64> { ... }
fn isatty(
&mut self,
miri_fd: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn realpath(
&mut self,
path_op: &OpTy<'tcx, Provenance>,
processed_path_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn mkstemp(
&mut self,
template_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, i32> { ... }
}
Provided Methods§
fn open(&mut self, args: &[OpTy<'tcx, Provenance>]) -> InterpResult<'tcx, i32>
fn fcntl(&mut self, args: &[OpTy<'tcx, Provenance>]) -> InterpResult<'tcx, i32>
fn close( &mut self, fd_op: &OpTy<'tcx, Provenance> ) -> InterpResult<'tcx, Scalar<Provenance>>
sourcefn handle_not_found<T: From<i32>>(&mut self) -> InterpResult<'tcx, T>
fn handle_not_found<T: From<i32>>(&mut self) -> InterpResult<'tcx, T>
Function used when a handle is not found inside FileHandler
. It returns Ok(-1)
and sets
the last OS error to libc::EBADF
(invalid file descriptor). This function uses
T: From<i32>
instead of i32
directly because some fs functions return different integer
types (like read
, that returns an i64
).