strace/linux/aarch64/set_scno.c
Dmitry V. Levin 7fa3d78319 Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t
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.
2016-12-26 10:43:34 +00:00

23 lines
547 B
C

#ifndef NT_ARM_SYSTEM_CALL
# define NT_ARM_SYSTEM_CALL 0x404
#endif
/*
* NT_ARM_SYSTEM_CALL regset is supported by linux kernel
* starting with commit v3.19-rc1~59^2~16.
*/
static int
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
unsigned int n = (uint16_t) scno;
const struct iovec io = {
.iov_base = &n,
.iov_len = sizeof(n)
};
int rc = ptrace(PTRACE_SETREGSET, tcp->pid, NT_ARM_SYSTEM_CALL, &io);
if (rc && errno != ESRCH)
perror_msg("arch_set_scno: NT_ARM_SYSTEM_CALL pid:%d scno:%#x",
tcp->pid, n);
return rc;
}