fn exit_syscall_and_prepare_restart(&mut self) -> bool {
        let mut r: Registers = self.regs_ref().clone();
        let syscallno: i32 = r.original_syscallno() as i32;
        log!(
            LogDebug,
            "exit_syscall_and_prepare_restart from syscall {}",
            syscall_name(syscallno, r.arch())
        );
        r.set_original_syscallno(syscall_number_for_gettid(r.arch()) as isize);
        self.set_regs(&r);
        // This exits the hijacked SYS_gettid.  Now the tracee is
        // ready to do our bidding.
        if !self.exit_syscall() {
            // The tracee suddenly exited. To get this to replay correctly, we need to
            // make it look like we really entered the syscall. Then
            // handle_ptrace_exit_event will record something appropriate.
            r.set_original_syscallno(syscallno as isize);
            r.set_syscall_result_signed(-ENOSYS as isize);
            self.set_regs(&r);
            return false;
        }
        log!(LogDebug, "exit_syscall_and_prepare_restart done");

        // Restore these regs to what they would have been just before
        // the tracee trapped at the syscall.
        r.set_original_syscallno(-1);
        r.set_syscallno(syscallno as isize);
        r.set_ip(r.ip() - syscall_instruction_length(r.arch()));
        self.set_regs(&r);
        true
    }
/// Assuming we've just entered a syscall, exit that syscall and reset
/// state to reenter the syscall just as it was called the first time.
/// Returns false if we see the process exit instead.
Assuming we've just entered a syscall, exit that syscall and reset
state to reenter the syscall just as it was called the first time.
Returns false if we see the process exit instead.
Assuming we ' ve just entered a syscall exit that syscall and reset state to reenter the syscall just as it was called the first time . Returns false if we see the process exit instead .
fn exit_syscall_and_prepare_restart(&mut self) -> bool {
        let mut r: Registers = self.regs_ref().clone();
        let syscallno: i32 = r.original_syscallno() as i32;
        log!(
            LogDebug,
            "exit_syscall_and_prepare_restart from syscall {}",
            syscall_name(syscallno, r.arch())
        );
        r.set_original_syscallno(syscall_number_for_gettid(r.arch()) as isize);
        self.set_regs(&r);
        // This exits the hijacked SYS_gettid.  Now the tracee is
        // ready to do our bidding.
        if !self.exit_syscall() {
            // The tracee suddenly exited. To get this to replay correctly, we need to
            // make it look like we really entered the syscall. Then
            // handle_ptrace_exit_event will record something appropriate.
            r.set_original_syscallno(syscallno as isize);
            r.set_syscall_result_signed(-ENOSYS as isize);
            self.set_regs(&r);
            return false;
        }
        log!(LogDebug, "exit_syscall_and_prepare_restart done");
        // Restore these regs to what they would have been just before
        // the tracee trapped at the syscall.
        r.set_original_syscallno(-1);
        r.set_syscallno(syscallno as isize);
        r.set_ip(r.ip() - syscall_instruction_length(r.arch()));
        self.set_regs(&r);
        true
    }
fn exit_syscall_and_prepare_restart ( & mut self ) -> bool { let mut r : Registers = self . regs_ref ( ) . clone ( ) ; let syscallno : i32 = r . original_syscallno ( ) as i32 ; log ! ( LogDebug " " syscall_name ( syscallno r arch ( ) ) ) ; r . set_original_syscallno ( syscall_number_for_gettid ( r . arch ( ) ) as isize ) ; self . set_regs ( & r ) ; // This exits the hijacked SYS_gettid.  Now the tracee is // ready to do our bidding. if ! self . exit_syscall ( ) { // The tracee suddenly exited. To get this to replay correctly, we need to // make it look like we really entered the syscall. Then // handle_ptrace_exit_event will record something appropriate. r . set_original_syscallno ( syscallno as isize ) ; r . set_syscall_result_signed ( - ENOSYS as isize ) ; self . set_regs ( & r ) ; return false ; } log ! ( LogDebug " " ) ; // Restore these regs to what they would have been just before // the tracee trapped at the syscall. r . set_original_syscallno ( - 1 ) ; r . set_syscallno ( syscallno as isize ) ; r . set_ip ( r . ip ( ) - syscall_instruction_length ( r . arch ( ) ) ) ; self . set_regs ( & r ) ; true }
Assuming we've just entered a syscall, exit that syscall and reset
state to reenter the syscall just as it was called the first time.
Assuming we ' ve just entered a syscall exit that syscall and reset state to reenter the syscall just as it was called the first time .
&mut self