pub fn is_syscall_restart(&self) -> bool {
        if EventType::EvSyscallInterruption != self.ev().event_type() {
            return false;
        }

        let mut syscallno = self.regs_ref().original_syscallno() as i32;
        let syscall_arch = self.ev().syscall().arch();
        let call_name = syscall_name(syscallno, syscall_arch);
        let mut is_restart = false;
        log!(
            LogDebug,
            "  is syscall interruption of recorded {} ? (now {})",
            self.ev(),
            call_name
        );

        // It's possible for the tracee to resume after a sighandler
        // with a fresh syscall that happens to be the same as the one
        // that was interrupted.  So we check here if the args are the
        // same.
        //
        // Of course, it's possible (but less likely) for the tracee
        // to incidentally resume with a fresh syscall that just
        // happens to have the same *arguments* too.  But in that
        // case, we would usually set up scratch buffers etc the same
        // was as for the original interrupted syscall, so we just
        // save a step here.
        //
        // TODO: it's possible for arg structures to be mutated
        // between the original call and restarted call in such a way
        // that it might change the scratch allocation decisions. */
        if is_restart_syscall_syscall(syscallno, syscall_arch) {
            is_restart = true;
            syscallno = self.ev().syscall().number;
            log!(LogDebug, "  (SYS_restart_syscall)");
        }

        let mut skip = false;
        if self.ev().syscall().number != syscallno {
            log!(LogDebug, "  interrupted {} != {}", self.ev(), call_name);
            skip = true;
        } else {
            let old_regs = &self.ev().syscall().regs;
            if !(old_regs.arg1() == self.regs_ref().arg1()
                && old_regs.arg2() == self.regs_ref().arg2()
                && old_regs.arg3() == self.regs_ref().arg3()
                && old_regs.arg4() == self.regs_ref().arg4()
                && old_regs.arg5() == self.regs_ref().arg5()
                && old_regs.arg6() == self.regs_ref().arg6())
            {
                log!(
                    LogDebug,
                    "  regs different at interrupted {}: {} vs {}",
                    call_name,
                    old_regs,
                    self.regs_ref()
                );
                skip = true;
            }
        }

        if !skip {
            is_restart = true;
        }

        if is_restart {
            log!(LogDebug, "  restart of {}", call_name);
        }

        is_restart
    }
/// Return true if the current state of this looks like the
/// interrupted syscall at the top of our event stack, if there
/// is one.
Return true if the current state of this looks like the
interrupted syscall at the top of our event stack, if there
is one.
Return true if the current state of this looks like the interrupted syscall at the top of our event stack if there is one .
pub fn is_syscall_restart(&self) -> bool {
        if EventType::EvSyscallInterruption != self.ev().event_type() {
            return false;
        }
        let mut syscallno = self.regs_ref().original_syscallno() as i32;
        let syscall_arch = self.ev().syscall().arch();
        let call_name = syscall_name(syscallno, syscall_arch);
        let mut is_restart = false;
        log!(
            LogDebug,
            "  is syscall interruption of recorded {} ? (now {})",
            self.ev(),
            call_name
        );
        // It's possible for the tracee to resume after a sighandler
        // with a fresh syscall that happens to be the same as the one
        // that was interrupted.  So we check here if the args are the
        // same.
        //
        // Of course, it's possible (but less likely) for the tracee
        // to incidentally resume with a fresh syscall that just
        // happens to have the same *arguments* too.  But in that
        // case, we would usually set up scratch buffers etc the same
        // was as for the original interrupted syscall, so we just
        // save a step here.
        //
        // TODO: it's possible for arg structures to be mutated
        // between the original call and restarted call in such a way
        // that it might change the scratch allocation decisions. */
        if is_restart_syscall_syscall(syscallno, syscall_arch) {
            is_restart = true;
            syscallno = self.ev().syscall().number;
            log!(LogDebug, "  (SYS_restart_syscall)");
        }
        let mut skip = false;
        if self.ev().syscall().number != syscallno {
            log!(LogDebug, "  interrupted {} != {}", self.ev(), call_name);
            skip = true;
        } else {
            let old_regs = &self.ev().syscall().regs;
            if !(old_regs.arg1() == self.regs_ref().arg1()
                && old_regs.arg2() == self.regs_ref().arg2()
                && old_regs.arg3() == self.regs_ref().arg3()
                && old_regs.arg4() == self.regs_ref().arg4()
                && old_regs.arg5() == self.regs_ref().arg5()
                && old_regs.arg6() == self.regs_ref().arg6())
            {
                log!(
                    LogDebug,
                    "  regs different at interrupted {}: {} vs {}",
                    call_name,
                    old_regs,
                    self.regs_ref()
                );
                skip = true;
            }
        }
        if !skip {
            is_restart = true;
        }
        if is_restart {
            log!(LogDebug, "  restart of {}", call_name);
        }
        is_restart
    }
pub fn is_syscall_restart ( & self ) -> bool { if EventType :: EvSyscallInterruption != self . ev ( ) . event_type ( ) { return false ; } let mut syscallno = self . regs_ref ( ) . original_syscallno ( ) as i32 ; let syscall_arch = self . ev ( ) . syscall ( ) . arch ( ) ; let call_name = syscall_name ( syscallno , syscall_arch ) ; let mut is_restart = false ; log ! ( LogDebug " " self ev ( ) call_name ) ; // It's possible for the tracee to resume after a sighandler // with a fresh syscall that happens to be the same as the one // that was interrupted.  So we check here if the args are the // same. // // Of course, it's possible (but less likely) for the tracee // to incidentally resume with a fresh syscall that just // happens to have the same *arguments* too.  But in that // case, we would usually set up scratch buffers etc the same // was as for the original interrupted syscall, so we just // save a step here. // // TODO: it's possible for arg structures to be mutated // between the original call and restarted call in such a way // that it might change the scratch allocation decisions. */ if is_restart_syscall_syscall ( syscallno , syscall_arch ) { is_restart = true ; syscallno = self . ev ( ) . syscall ( ) . number ; log ! ( LogDebug " " ) ; } let mut skip = false ; if self . ev ( ) . syscall ( ) . number != syscallno { log ! ( LogDebug " " self ev ( ) call_name ) ; skip = true ; } else { let old_regs = & self . ev ( ) . syscall ( ) . regs ; if ! ( old_regs . arg1 ( ) == self . regs_ref ( ) . arg1 ( ) && old_regs . arg2 ( ) == self . regs_ref ( ) . arg2 ( ) && old_regs . arg3 ( ) == self . regs_ref ( ) . arg3 ( ) && old_regs . arg4 ( ) == self . regs_ref ( ) . arg4 ( ) && old_regs . arg5 ( ) == self . regs_ref ( ) . arg5 ( ) && old_regs . arg6 ( ) == self . regs_ref ( ) . arg6 ( ) ) { log ! ( LogDebug " " call_name old_regs self regs_ref ( ) ) ; skip = true ; } } if ! skip { is_restart = true ; } if is_restart { log ! ( LogDebug " " call_name ) ; } is_restart }
Return true if the current state of this looks like the
interrupted syscall at the top of our event stack, if there
is one.
Return true if the current state of this looks like the interrupted syscall at the top of our event stack if there is one .
&self