You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
393 B
22 lines
393 B
/*
|
|
* Copyright 2003 PathScale, Inc.
|
|
*
|
|
* Licensed under the GPL
|
|
*/
|
|
|
|
#include <errno.h>
|
|
#include "ptrace_user.h"
|
|
|
|
int ptrace_getregs(long pid, unsigned long *regs_out)
|
|
{
|
|
if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
|
|
return -errno;
|
|
return(0);
|
|
}
|
|
|
|
int ptrace_setregs(long pid, unsigned long *regs_out)
|
|
{
|
|
if (ptrace(PTRACE_SETREGS, pid, 0, regs_out) < 0)
|
|
return -errno;
|
|
return(0);
|
|
}
|
|
|