mirror of https://github.com/Qortal/Brooklyn
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.
21 lines
419 B
21 lines
419 B
/* |
|
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
|
* 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) |
|
{ |
|
if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) |
|
return -errno; |
|
return 0; |
|
}
|
|
|