pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn dup(&mut self, old_fd_num: i32) -> InterpResult<'tcx, Scalar> { ... }
fn dup2(
&mut self,
old_fd_num: i32,
new_fd_num: i32,
) -> InterpResult<'tcx, Scalar> { ... }
fn flock(&mut self, fd_num: i32, op: i32) -> InterpResult<'tcx, Scalar> { ... }
fn ioctl(
&mut self,
fd: &OpTy<'tcx>,
op: &OpTy<'tcx>,
varargs: &[OpTy<'tcx>],
) -> InterpResult<'tcx, Scalar> { ... }
fn fcntl(
&mut self,
fd_num: &OpTy<'tcx>,
cmd: &OpTy<'tcx>,
varargs: &[OpTy<'tcx>],
) -> InterpResult<'tcx, Scalar> { ... }
fn close(&mut self, fd_op: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar> { ... }
fn read(
&mut self,
fd_num: i32,
buf: Pointer,
count: u64,
offset: Option<i128>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
fn write(
&mut self,
fd_num: i32,
buf: Pointer,
count: u64,
offset: Option<i128>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
fn readv(
&mut self,
fd: &OpTy<'tcx>,
iov: &OpTy<'tcx>,
iovcnt: &OpTy<'tcx>,
offset: Option<&OpTy<'tcx>>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
fn writev(
&mut self,
fd: &OpTy<'tcx>,
iov: &OpTy<'tcx>,
iovcnt: &OpTy<'tcx>,
offset: Option<&OpTy<'tcx>>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
}Provided Methods§
fn dup(&mut self, old_fd_num: i32) -> InterpResult<'tcx, Scalar>
fn dup2( &mut self, old_fd_num: i32, new_fd_num: i32, ) -> InterpResult<'tcx, Scalar>
fn flock(&mut self, fd_num: i32, op: i32) -> InterpResult<'tcx, Scalar>
fn ioctl( &mut self, fd: &OpTy<'tcx>, op: &OpTy<'tcx>, varargs: &[OpTy<'tcx>], ) -> InterpResult<'tcx, Scalar>
fn fcntl( &mut self, fd_num: &OpTy<'tcx>, cmd: &OpTy<'tcx>, varargs: &[OpTy<'tcx>], ) -> InterpResult<'tcx, Scalar>
fn close(&mut self, fd_op: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar>
Sourcefn read(
&mut self,
fd_num: i32,
buf: Pointer,
count: u64,
offset: Option<i128>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn read( &mut self, fd_num: i32, buf: Pointer, count: u64, offset: Option<i128>, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Read data from fd into buffer specified by buf and count.
If offset is None, reads data from current cursor position associated with fd
and updates cursor position on completion. Otherwise, reads from the specified offset
and keeps the cursor unchanged.
fn write( &mut self, fd_num: i32, buf: Pointer, count: u64, offset: Option<i128>, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Sourcefn readv(
&mut self,
fd: &OpTy<'tcx>,
iov: &OpTy<'tcx>,
iovcnt: &OpTy<'tcx>,
offset: Option<&OpTy<'tcx>>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn readv( &mut self, fd: &OpTy<'tcx>, iov: &OpTy<'tcx>, iovcnt: &OpTy<'tcx>, offset: Option<&OpTy<'tcx>>, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Vectored reads are implemented by first reading bytes from fd
into a temporary buffer which has the combined size of all buffers in
iov. After that we split the bytes of the combined buffer into the
buffers of iov. This ensures that the vectored read occurs atomically.
Sourcefn writev(
&mut self,
fd: &OpTy<'tcx>,
iov: &OpTy<'tcx>,
iovcnt: &OpTy<'tcx>,
offset: Option<&OpTy<'tcx>>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn writev( &mut self, fd: &OpTy<'tcx>, iov: &OpTy<'tcx>, iovcnt: &OpTy<'tcx>, offset: Option<&OpTy<'tcx>>, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Vectored writes are implemented by first writing the bytes from all
buffers of iov into a combined temporary buffer and then writing this
combined buffer into fd. This ensures that the vectored write occurs atomically.