summaryrefslogtreecommitdiff
path: root/arch/x86/um/shared/sysdep/ptrace_user_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/um/shared/sysdep/ptrace_user_32.h')
-rw-r--r--arch/x86/um/shared/sysdep/ptrace_user_32.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/x86/um/shared/sysdep/ptrace_user_32.h b/arch/x86/um/shared/sysdep/ptrace_user_32.h
new file mode 100644
index 000000000000..9d88a79a138b
--- /dev/null
+++ b/arch/x86/um/shared/sysdep/ptrace_user_32.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
+ * Licensed under the GPL
+ */
+
+#ifndef __SYSDEP_I386_PTRACE_USER_H__
+#define __SYSDEP_I386_PTRACE_USER_H__
+
+#include <sys/ptrace.h>
+#include <linux/ptrace.h>
+#include <asm/ptrace.h>
+#include <generated/user_constants.h>
+
+#define PT_OFFSET(r) ((r) * sizeof(long))
+
+#define PT_SYSCALL_NR(regs) ((regs)[ORIG_EAX])
+#define PT_SYSCALL_NR_OFFSET PT_OFFSET(ORIG_EAX)
+
+#define PT_SYSCALL_RET_OFFSET PT_OFFSET(EAX)
+
+#define REGS_IP_INDEX EIP
+#define REGS_SP_INDEX UESP
+
+#define FP_SIZE ((HOST_FPX_SIZE > HOST_FP_SIZE) ? HOST_FPX_SIZE : HOST_FP_SIZE)
+
+#endif