1 #ifndef PTRACE_SET_SYSCALL 2 # define PTRACE_SET_SYSCALL 23 3 #endif 4 /* 5 * PTRACE_SET_SYSCALL is supported by linux kernel 6 * starting with commit v2.6.16-rc1~107^2 7 */ 8 9 static int 10 arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) 11 { 12 unsigned int n = (uint16_t) scno; 13 int rc = ptrace(PTRACE_SET_SYSCALL, tcp->pid, NULL, (unsigned long) n); 14 if (rc && errno != ESRCH) 15 perror_msg("arch_set_scno: PTRACE_SET_SYSCALL pid:%d scno:%#x", 16 tcp->pid, n); 17 return rc; 18 } 19