1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #include <generated/user_constants.h> 3 4 #define PT_OFFSET(r) ((r) * sizeof(long)) 5 6 #define PT_SYSCALL_NR(regs) ((regs)[HOST_ORIG_AX]) 7 #define PT_SYSCALL_NR_OFFSET PT_OFFSET(HOST_ORIG_AX) 8 9 #define PT_SYSCALL_RET_OFFSET PT_OFFSET(HOST_AX) 10 11 #define REGS_IP_INDEX HOST_IP 12 #define REGS_SP_INDEX HOST_SP 13 14 /* 15 * glibc before 2.27 does not include PTRACE_SYSEMU_SINGLESTEP in its enum, 16 * ensure we have a definition by (re-)defining it here. 17 */ 18 #ifndef PTRACE_SYSEMU_SINGLESTEP 19 #define PTRACE_SYSEMU_SINGLESTEP 32 20 #endif 21