]> err.no Git - linux-2.6/blob - arch/um/sys-i386/ptrace_user.c
uml: throw out CONFIG_MODE_TT
[linux-2.6] / arch / um / sys-i386 / ptrace_user.c
1 /*
2  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #include <stdio.h>
7 #include <stddef.h>
8 #include <errno.h>
9 #include <unistd.h>
10 #include "ptrace_user.h"
11 /* Grr, asm/user.h includes asm/ptrace.h, so has to follow ptrace_user.h */
12 #include <asm/user.h>
13 #include "kern_util.h"
14 #include "sysdep/thread.h"
15 #include "user.h"
16 #include "os.h"
17 #include "uml-config.h"
18
19 int ptrace_getregs(long pid, unsigned long *regs_out)
20 {
21         if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
22                 return -errno;
23         return 0;
24 }
25
26 int ptrace_setregs(long pid, unsigned long *regs)
27 {
28         if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
29                 return -errno;
30         return 0;
31 }
32
33 int ptrace_getfpregs(long pid, unsigned long *regs)
34 {
35         if (ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0)
36                 return -errno;
37         return 0;
38 }
39
40 int ptrace_setfpregs(long pid, unsigned long *regs)
41 {
42         if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0)
43                 return -errno;
44         return 0;
45 }