Lines Matching refs:child
60 int start_trace(pid_t child)
64 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL);
69 ret = waitpid(child, NULL, 0);
70 if (ret != child) {
77 int stop_trace(pid_t child)
81 ret = ptrace(PTRACE_DETACH, child, NULL, NULL);
89 int cont_trace(pid_t child)
93 ret = ptrace(PTRACE_CONT, child, NULL, NULL);
101 int ptrace_read_regs(pid_t child, unsigned long type, unsigned long regs[],
107 FAIL_IF(start_trace(child));
112 ret = ptrace(PTRACE_GETREGSET, child, type, &iov);
116 FAIL_IF(stop_trace(child));
121 long ptrace_write_regs(pid_t child, unsigned long type, unsigned long regs[],
127 FAIL_IF(start_trace(child));
132 ret = ptrace(PTRACE_SETREGSET, child, type, &iov);
134 FAIL_IF(stop_trace(child));
140 int show_tar_registers(pid_t child, unsigned long *out)
154 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TAR, &iov);
162 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_PPR, &iov);
170 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_DSCR, &iov);
185 int write_tar_registers(pid_t child, unsigned long tar,
202 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TAR, &iov);
209 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_PPR, &iov);
216 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_DSCR, &iov);
229 int show_tm_checkpointed_state(pid_t child, unsigned long *out)
244 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CTAR, &iov);
252 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CPPR, &iov);
260 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CDSCR, &iov);
276 int write_ckpt_tar_registers(pid_t child, unsigned long tar,
293 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CTAR, &iov);
300 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CPPR, &iov);
307 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CDSCR, &iov);
321 int show_fpr(pid_t child, unsigned long *fpr)
327 ret = ptrace(PTRACE_GETFPREGS, child, NULL, regs);
340 int write_fpr(pid_t child, unsigned long val)
346 ret = ptrace(PTRACE_GETFPREGS, child, NULL, regs);
355 ret = ptrace(PTRACE_SETFPREGS, child, NULL, regs);
363 int show_ckpt_fpr(pid_t child, unsigned long *fpr)
373 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CFPR, &iov);
387 int write_ckpt_fpr(pid_t child, unsigned long val)
397 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CFPR, &iov);
406 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CFPR, &iov);
415 int show_gpr(pid_t child, unsigned long *gpr)
426 ret = ptrace(PTRACE_GETREGS, child, NULL, regs);
440 int write_gpr(pid_t child, unsigned long val)
451 ret = ptrace(PTRACE_GETREGS, child, NULL, regs);
460 ret = ptrace(PTRACE_SETREGS, child, NULL, regs);
468 int show_ckpt_gpr(pid_t child, unsigned long *gpr)
483 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CGPR, &iov);
497 int write_ckpt_gpr(pid_t child, unsigned long val)
511 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CGPR, &iov);
520 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CGPR, &iov);
529 int show_vmx(pid_t child, unsigned long vmx[][2])
533 ret = ptrace(PTRACE_GETVRREGS, child, 0, vmx);
541 int show_vmx_ckpt(pid_t child, unsigned long vmx[][2])
549 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CVMX, &iov);
559 int write_vmx(pid_t child, unsigned long vmx[][2])
563 ret = ptrace(PTRACE_SETVRREGS, child, 0, vmx);
571 int write_vmx_ckpt(pid_t child, unsigned long vmx[][2])
580 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CVMX, &iov);
589 int show_vsx(pid_t child, unsigned long *vsx)
593 ret = ptrace(PTRACE_GETVSRREGS, child, 0, vsx);
601 int show_vsx_ckpt(pid_t child, unsigned long *vsx)
609 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CVSX, &iov);
618 int write_vsx(pid_t child, unsigned long *vsx)
622 ret = ptrace(PTRACE_SETVSRREGS, child, 0, vsx);
630 int write_vsx_ckpt(pid_t child, unsigned long *vsx)
639 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CVSX, &iov);
648 int show_tm_spr(pid_t child, struct tm_spr_regs *out)
663 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_SPR, &iov);