+ {
+ if (sys == 0xffffffff)
+ {
+ /* Some syscalls (sigreturn et al.) do not return a value */
+ if (!(last_act & A_NO_RETVAL))
+ err("XX: Syscall does not return, but it should");
+ }
+ else
+ {
+ if (sys != last_sys)
+ err("XX: Mismatched syscall entry/exit");
+ }
+ if (last_act & A_NO_RETVAL)
+ msg("= ?\n");
+ else
+ msg("= %ld\n", u.regs.eax);
+ }
+ ptrace(PTRACE_SYSCALL, box_pid, 0, 0);
+ }
+ else if (sig == SIGSTOP)
+ {
+ msg(">> SIGSTOP\n");
+ if (ptrace(PTRACE_SETOPTIONS, box_pid, NULL, (void *) PTRACE_O_TRACESYSGOOD) < 0)
+ die("ptrace(PTRACE_SETOPTIONS): %m");