blob: 3960ca1dd35a3bb8f032a8f975e24d1c5c1a6c8f [file] [log] [blame]
Jeff Dike48b20182007-05-06 14:51:00 -07001/*
Jeff Dike4c9e1382007-10-16 01:26:54 -07002 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Licensed under the GPL
4 */
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#include <errno.h>
Al Viro6582b7f2011-08-18 20:03:19 +01007#include "ptrace_user.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
9int 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
16int ptrace_setregs(long pid, unsigned long *regs)
17{
18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
19 return -errno;
20 return 0;
21}