https://github.com/torvalds/linux
Raw File
Tip revision: 55d512e245bc7699a8800e23df1a24195dd08217 authored by Linus Torvalds on 08 September 2012, 23:43:45 UTC
Linux 3.6-rc5
Tip revision: 55d512e
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