2005-04-17 06:20:36 +08:00
|
|
|
/*
|
2007-10-16 16:27:00 +08:00
|
|
|
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
2005-04-17 06:20:36 +08:00
|
|
|
* Licensed under the GPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UM_PTRACE_GENERIC_H
|
|
|
|
#define __UM_PTRACE_GENERIC_H
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2006-09-26 14:33:10 +08:00
|
|
|
#include "asm/arch/ptrace-abi.h"
|
2007-10-16 16:27:16 +08:00
|
|
|
#include <asm/user.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
#include "sysdep/ptrace.h"
|
|
|
|
|
|
|
|
struct pt_regs {
|
2007-10-16 16:26:58 +08:00
|
|
|
struct uml_pt_regs regs;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2006-03-31 18:30:15 +08:00
|
|
|
#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define PT_REGS_IP(r) UPT_IP(&(r)->regs)
|
|
|
|
#define PT_REGS_SP(r) UPT_SP(&(r)->regs)
|
|
|
|
|
|
|
|
#define PT_REG(r, reg) UPT_REG(&(r)->regs, reg)
|
|
|
|
#define PT_REGS_SET(r, reg, val) UPT_SET(&(r)->regs, reg, val)
|
|
|
|
|
|
|
|
#define PT_REGS_SET_SYSCALL_RETURN(r, res) \
|
|
|
|
UPT_SET_SYSCALL_RETURN(&(r)->regs, res)
|
|
|
|
#define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
|
|
|
|
|
|
|
|
#define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
|
|
|
|
|
|
|
|
#define PT_REGS_SC(r) UPT_SC(&(r)->regs)
|
|
|
|
|
|
|
|
#define instruction_pointer(regs) PT_REGS_IP(regs)
|
|
|
|
|
|
|
|
struct task_struct;
|
|
|
|
|
2007-10-16 16:27:16 +08:00
|
|
|
extern long subarch_ptrace(struct task_struct *child, long request, long addr,
|
|
|
|
long data);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern unsigned long getreg(struct task_struct *child, int regno);
|
|
|
|
extern int putreg(struct task_struct *child, int regno, unsigned long value);
|
2007-10-16 16:27:16 +08:00
|
|
|
extern int get_fpregs(struct user_i387_struct __user *buf,
|
|
|
|
struct task_struct *child);
|
|
|
|
extern int set_fpregs(struct user_i387_struct __user *buf,
|
|
|
|
struct task_struct *child);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
extern void show_regs(struct pt_regs *regs);
|
|
|
|
|
2006-03-31 18:30:22 +08:00
|
|
|
extern int arch_copy_tls(struct task_struct *new);
|
|
|
|
extern void clear_flushed_tls(struct task_struct *task);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2006-03-31 18:30:22 +08:00
|
|
|
#endif
|