Path: blob/master/arch/x86/include/uapi/asm/ptrace-abi.h
26495 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _ASM_X86_PTRACE_ABI_H2#define _ASM_X86_PTRACE_ABI_H34#ifdef __i386__56#define EBX 07#define ECX 18#define EDX 29#define ESI 310#define EDI 411#define EBP 512#define EAX 613#define DS 714#define ES 815#define FS 916#define GS 1017#define ORIG_EAX 1118#define EIP 1219#define CS 1320#define EFL 1421#define UESP 1522#define SS 1623#define FRAME_SIZE 172425#else /* __i386__ */2627#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)28/*29* C ABI says these regs are callee-preserved. They aren't saved on kernel entry30* unless syscall needs a complete, fully filled "struct pt_regs".31*/32#define R15 033#define R14 834#define R13 1635#define R12 2436#define RBP 3237#define RBX 4038/* These regs are callee-clobbered. Always saved on kernel entry. */39#define R11 4840#define R10 5641#define R9 6442#define R8 7243#define RAX 8044#define RCX 8845#define RDX 9646#define RSI 10447#define RDI 11248/*49* On syscall entry, this is syscall#. On CPU exception, this is error code.50* On hw interrupt, it's IRQ number:51*/52#define ORIG_RAX 12053/* Return frame for iretq */54#define RIP 12855#define CS 13656#define EFLAGS 14457#define RSP 15258#define SS 16059#endif /* __ASSEMBLER__ */6061/* top of stack page */62#define FRAME_SIZE 1686364#endif /* !__i386__ */6566/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */67#define PTRACE_GETREGS 1268#define PTRACE_SETREGS 1369#define PTRACE_GETFPREGS 1470#define PTRACE_SETFPREGS 1571#define PTRACE_GETFPXREGS 1872#define PTRACE_SETFPXREGS 197374#define PTRACE_OLDSETOPTIONS 217576/* only useful for access 32bit programs / kernels */77#define PTRACE_GET_THREAD_AREA 2578#define PTRACE_SET_THREAD_AREA 267980#ifdef __x86_64__81# define PTRACE_ARCH_PRCTL 3082#endif8384#define PTRACE_SYSEMU 3185#define PTRACE_SYSEMU_SINGLESTEP 328687#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */8889#ifndef __ASSEMBLER__90#include <linux/types.h>91#endif9293#endif /* _ASM_X86_PTRACE_ABI_H */949596