Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
0003  * Licensed under the GPL
0004  */
0005 
0006 #include <errno.h>
0007 #include <ptrace_user.h>
0008 
0009 int ptrace_getregs(long pid, unsigned long *regs_out)
0010 {
0011     if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
0012         return -errno;
0013     return 0;
0014 }
0015 
0016 int ptrace_setregs(long pid, unsigned long *regs)
0017 {
0018     if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
0019         return -errno;
0020     return 0;
0021 }