1 /*
2  * Copyright 2003 PathScale, Inc.
3  *
4  * Licensed under the GPL
5  */
6 
7 #include <errno.h>
8 #include "ptrace_user.h"
9 
ptrace_getregs(long pid,unsigned long * regs_out)10 int ptrace_getregs(long pid, unsigned long *regs_out)
11 {
12 	if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
13 		return -errno;
14 	return(0);
15 }
16 
ptrace_setregs(long pid,unsigned long * regs_out)17 int ptrace_setregs(long pid, unsigned long *regs_out)
18 {
19 	if (ptrace(PTRACE_SETREGS, pid, 0, regs_out) < 0)
20 		return -errno;
21 	return(0);
22 }
23