Dmitry V. Levin
7fa3d78319
Remove temporary types created for transition from long to kernel_ulong_t. Automatically replace kernel_scno_t and kernel_ureg_t with kernel_ulong_t using $ git grep -El 'kernel_(scno|ureg)_t' | xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g' * kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove. All users updated.
19 lines
466 B
C
19 lines
466 B
C
#ifndef PTRACE_SET_SYSCALL
|
|
# define PTRACE_SET_SYSCALL 23
|
|
#endif
|
|
/*
|
|
* PTRACE_SET_SYSCALL is supported by linux kernel
|
|
* starting with commit v2.6.16-rc1~107^2
|
|
*/
|
|
|
|
static int
|
|
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
|
|
{
|
|
unsigned int n = (uint16_t) scno;
|
|
int rc = ptrace(PTRACE_SET_SYSCALL, tcp->pid, NULL, (unsigned long) n);
|
|
if (rc && errno != ESRCH)
|
|
perror_msg("arch_set_scno: PTRACE_SET_SYSCALL pid:%d scno:%#x",
|
|
tcp->pid, n);
|
|
return rc;
|
|
}
|