https://github.com/torvalds/linux
Raw File
Tip revision: 049e6dde7e57f0054fdc49102e7ef4830c698b46 authored by Linus Torvalds on 04 October 2015, 15:57:17 UTC
Linux 4.3-rc4
Tip revision: 049e6dd
ptrace_user.c
/*
 * 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;
}
back to top