Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
awilliam
GitHub Repository: awilliam/linux-vfio
Path: blob/master/arch/um/sys-x86_64/ptrace_user.c
10817 views
1
/*
2
* Copyright 2003 PathScale, Inc.
3
*
4
* Licensed under the GPL
5
*/
6
7
#include <errno.h>
8
#include "ptrace_user.h"
9
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
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
24