ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-um / ptrace-generic.h
1 /* 
2  * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #ifndef __UM_PTRACE_GENERIC_H
7 #define __UM_PTRACE_GENERIC_H
8
9 #ifndef __ASSEMBLY__
10
11 #include "linux/config.h"
12
13 #include "asm/current.h"
14
15 #define pt_regs pt_regs_subarch
16 #define show_regs show_regs_subarch
17
18 #include "asm/arch/ptrace.h"
19
20 #undef pt_regs
21 #undef show_regs
22 #undef user_mode
23 #undef instruction_pointer
24
25 #include "sysdep/ptrace.h"
26 #include "skas_ptrace.h"
27
28 struct pt_regs {
29         union uml_pt_regs regs;
30 };
31
32 #define EMPTY_REGS { regs : EMPTY_UML_PT_REGS }
33
34 #define PT_REGS_IP(r) UPT_IP(&(r)->regs)
35 #define PT_REGS_SP(r) UPT_SP(&(r)->regs)
36
37 #define PT_REG(r, reg) UPT_REG(&(r)->regs, reg)
38 #define PT_REGS_SET(r, reg, val) UPT_SET(&(r)->regs, reg, val)
39
40 #define PT_REGS_SET_SYSCALL_RETURN(r, res) \
41         UPT_SET_SYSCALL_RETURN(&(r)->regs, res)
42 #define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
43
44 #define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
45
46 #define PT_REGS_SC(r) UPT_SC(&(r)->regs)
47
48 struct task_struct;
49
50 extern unsigned long getreg(struct task_struct *child, int regno);
51 extern int putreg(struct task_struct *child, int regno, unsigned long value);
52 extern int get_fpregs(unsigned long buf, struct task_struct *child);
53 extern int set_fpregs(unsigned long buf, struct task_struct *child);
54 extern int get_fpxregs(unsigned long buf, struct task_struct *child);
55 extern int set_fpxregs(unsigned long buf, struct task_struct *tsk);
56
57 extern void show_regs(struct pt_regs *regs);
58
59 #endif
60
61 #endif
62
63 /*
64  * Overrides for Emacs so that we follow Linus's tabbing style.
65  * Emacs will notice this stuff at the end of the file and automatically
66  * adjust the settings for this buffer only.  This must remain at the end
67  * of the file.
68  * ---------------------------------------------------------------------------
69  * Local variables:
70  * c-file-style: "linux"
71  * End:
72  */