2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2003 PathScale, Inc.
|
|
|
|
*
|
|
|
|
* Licensed under the GPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UM_PTRACE_X86_64_H
|
|
|
|
#define __UM_PTRACE_X86_64_H
|
|
|
|
|
|
|
|
#include "linux/compiler.h"
|
2006-03-31 18:30:22 +08:00
|
|
|
#include "asm/errno.h"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define __FRAME_OFFSETS /* Needed to get the R* macros */
|
|
|
|
#include "asm/ptrace-generic.h"
|
|
|
|
|
2005-05-03 14:54:51 +08:00
|
|
|
#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#define PT_REGS_RBX(r) UPT_RBX(&(r)->regs)
|
|
|
|
#define PT_REGS_RCX(r) UPT_RCX(&(r)->regs)
|
|
|
|
#define PT_REGS_RDX(r) UPT_RDX(&(r)->regs)
|
|
|
|
#define PT_REGS_RSI(r) UPT_RSI(&(r)->regs)
|
|
|
|
#define PT_REGS_RDI(r) UPT_RDI(&(r)->regs)
|
|
|
|
#define PT_REGS_RBP(r) UPT_RBP(&(r)->regs)
|
|
|
|
#define PT_REGS_RAX(r) UPT_RAX(&(r)->regs)
|
|
|
|
#define PT_REGS_R8(r) UPT_R8(&(r)->regs)
|
|
|
|
#define PT_REGS_R9(r) UPT_R9(&(r)->regs)
|
|
|
|
#define PT_REGS_R10(r) UPT_R10(&(r)->regs)
|
|
|
|
#define PT_REGS_R11(r) UPT_R11(&(r)->regs)
|
|
|
|
#define PT_REGS_R12(r) UPT_R12(&(r)->regs)
|
|
|
|
#define PT_REGS_R13(r) UPT_R13(&(r)->regs)
|
|
|
|
#define PT_REGS_R14(r) UPT_R14(&(r)->regs)
|
|
|
|
#define PT_REGS_R15(r) UPT_R15(&(r)->regs)
|
|
|
|
|
|
|
|
#define PT_REGS_FS(r) UPT_FS(&(r)->regs)
|
|
|
|
#define PT_REGS_GS(r) UPT_GS(&(r)->regs)
|
|
|
|
#define PT_REGS_DS(r) UPT_DS(&(r)->regs)
|
|
|
|
#define PT_REGS_ES(r) UPT_ES(&(r)->regs)
|
|
|
|
#define PT_REGS_SS(r) UPT_SS(&(r)->regs)
|
|
|
|
#define PT_REGS_CS(r) UPT_CS(&(r)->regs)
|
|
|
|
|
|
|
|
#define PT_REGS_ORIG_RAX(r) UPT_ORIG_RAX(&(r)->regs)
|
|
|
|
#define PT_REGS_RIP(r) UPT_IP(&(r)->regs)
|
2011-08-19 03:10:39 +08:00
|
|
|
#define PT_REGS_SP(r) UPT_SP(&(r)->regs)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs)
|
|
|
|
|
|
|
|
/* XXX */
|
|
|
|
#define user_mode(r) UPT_IS_USER(&(r)->regs)
|
|
|
|
#define PT_REGS_ORIG_SYSCALL(r) PT_REGS_RAX(r)
|
|
|
|
#define PT_REGS_SYSCALL_RET(r) PT_REGS_RAX(r)
|
|
|
|
|
|
|
|
#define PT_FIX_EXEC_STACK(sp) do ; while(0)
|
|
|
|
|
|
|
|
#define profile_pc(regs) PT_REGS_IP(regs)
|
|
|
|
|
2008-08-19 05:47:45 +08:00
|
|
|
struct user_desc;
|
|
|
|
|
2006-03-31 18:30:22 +08:00
|
|
|
static inline int ptrace_get_thread_area(struct task_struct *child, int idx,
|
|
|
|
struct user_desc __user *user_desc)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2006-03-31 18:30:22 +08:00
|
|
|
static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
|
|
|
|
struct user_desc __user *user_desc)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
2007-10-16 16:26:58 +08:00
|
|
|
extern long arch_prctl(struct task_struct *task, int code,
|
|
|
|
unsigned long __user *addr);
|
2006-03-31 18:30:22 +08:00
|
|
|
#endif
|