1 #include <sys/ptrace.h>
3 #include <asm/ptrace.h>
4 #include "sysdep/ptrace.h"
6 int ptrace_getregs(long pid, unsigned long *regs_out)
9 for (i=0; i < sizeof(struct sys_pt_regs)/sizeof(PPC_REG); ++i) {
11 regs_out->regs[i] = ptrace(PTRACE_PEEKUSER, pid, i*4, 0);
19 int ptrace_setregs(long pid, unsigned long *regs_in)
22 for (i=0; i < sizeof(struct sys_pt_regs)/sizeof(PPC_REG); ++i) {
23 if (i != 34 /* FIXME: PT_ORIG_R3 */ && i <= PT_MQ) {
24 if (ptrace(PTRACE_POKEUSER, pid, i*4, regs_in->regs[i]) < 0) {
32 * Overrides for Emacs so that we follow Linus's tabbing style.
33 * Emacs will notice this stuff at the end of the file and automatically
34 * adjust the settings for this buffer only. This must remain at the end
36 * ---------------------------------------------------------------------------
38 * c-file-style: "linux"