https://github.com/torvalds/linux
Raw File
Tip revision: d1c3ed669a2d452cacfb48c2d171a1f364dae2ed authored by Linus Torvalds on 03 January 2013, 02:13:21 UTC
Linux 3.8-rc2
Tip revision: d1c3ed6
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