diff options
Diffstat (limited to 'arch/x86/um/ptrace_user.c')
| -rw-r--r-- | arch/x86/um/ptrace_user.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/um/ptrace_user.c b/arch/x86/um/ptrace_user.c new file mode 100644 index 000000000000..3960ca1dd35a --- /dev/null +++ b/arch/x86/um/ptrace_user.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) | ||
| 3 | * Licensed under the GPL | ||
| 4 | */ | ||
| 5 | |||
| 6 | #include <errno.h> | ||
| 7 | #include "ptrace_user.h" | ||
| 8 | |||
| 9 | int ptrace_getregs(long pid, unsigned long *regs_out) | ||
| 10 | { | ||
| 11 | if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0) | ||
| 12 | return -errno; | ||
| 13 | return 0; | ||
| 14 | } | ||
| 15 | |||
| 16 | int ptrace_setregs(long pid, unsigned long *regs) | ||
| 17 | { | ||
| 18 | if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) | ||
| 19 | return -errno; | ||
| 20 | return 0; | ||
| 21 | } | ||
