Lines Matching refs:child

64 int start_trace(pid_t child)
68 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL);
73 ret = waitpid(child, NULL, 0);
74 if (ret != child) {
81 int stop_trace(pid_t child)
85 ret = ptrace(PTRACE_DETACH, child, NULL, NULL);
93 int cont_trace(pid_t child)
97 ret = ptrace(PTRACE_CONT, child, NULL, NULL);
105 int ptrace_read_regs(pid_t child, unsigned long type, unsigned long regs[],
111 FAIL_IF(start_trace(child));
116 ret = ptrace(PTRACE_GETREGSET, child, type, &iov);
120 FAIL_IF(stop_trace(child));
125 long ptrace_write_regs(pid_t child, unsigned long type, unsigned long regs[],
131 FAIL_IF(start_trace(child));
136 ret = ptrace(PTRACE_SETREGSET, child, type, &iov);
138 FAIL_IF(stop_trace(child));
144 int show_tar_registers(pid_t child, unsigned long *out)
158 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TAR, &iov);
166 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_PPR, &iov);
174 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_DSCR, &iov);
189 int write_tar_registers(pid_t child, unsigned long tar,
206 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TAR, &iov);
213 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_PPR, &iov);
220 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_DSCR, &iov);
233 int show_tm_checkpointed_state(pid_t child, unsigned long *out)
248 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CTAR, &iov);
256 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CPPR, &iov);
264 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CDSCR, &iov);
280 int write_ckpt_tar_registers(pid_t child, unsigned long tar,
297 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CTAR, &iov);
304 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CPPR, &iov);
311 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CDSCR, &iov);
325 int show_fpr(pid_t child, __u64 *fpr)
331 ret = ptrace(PTRACE_GETFPREGS, child, NULL, regs);
344 int write_fpr(pid_t child, __u64 val)
350 ret = ptrace(PTRACE_GETFPREGS, child, NULL, regs);
359 ret = ptrace(PTRACE_SETFPREGS, child, NULL, regs);
367 int show_ckpt_fpr(pid_t child, __u64 *fpr)
377 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CFPR, &iov);
391 int write_ckpt_fpr(pid_t child, unsigned long val)
401 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CFPR, &iov);
410 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CFPR, &iov);
419 int show_gpr(pid_t child, unsigned long *gpr)
430 ret = ptrace(PTRACE_GETREGS, child, NULL, regs);
452 __u64 *peek_fprs(pid_t child)
466 ret = sys_ptrace(PTRACE_PEEKUSER, child, addr, (unsigned long)p);
474 ret = sys_ptrace(PTRACE_PEEKUSER, child, addr, (unsigned long)&addr);
483 int poke_fprs(pid_t child, unsigned long *fprs)
491 ret = sys_ptrace(PTRACE_POKEUSER, child, addr, *p);
499 ret = sys_ptrace(PTRACE_POKEUSER, child, addr, addr);
508 int write_gpr(pid_t child, unsigned long val)
519 ret = ptrace(PTRACE_GETREGS, child, NULL, regs);
528 ret = ptrace(PTRACE_SETREGS, child, NULL, regs);
536 int show_ckpt_gpr(pid_t child, unsigned long *gpr)
551 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CGPR, &iov);
565 int write_ckpt_gpr(pid_t child, unsigned long val)
579 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CGPR, &iov);
588 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CGPR, &iov);
597 int show_vmx(pid_t child, unsigned long vmx[][2])
601 ret = ptrace(PTRACE_GETVRREGS, child, 0, vmx);
609 int show_vmx_ckpt(pid_t child, unsigned long vmx[][2])
617 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CVMX, &iov);
627 int write_vmx(pid_t child, unsigned long vmx[][2])
631 ret = ptrace(PTRACE_SETVRREGS, child, 0, vmx);
639 int write_vmx_ckpt(pid_t child, unsigned long vmx[][2])
648 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CVMX, &iov);
657 int show_vsx(pid_t child, unsigned long *vsx)
661 ret = ptrace(PTRACE_GETVSRREGS, child, 0, vsx);
669 int show_vsx_ckpt(pid_t child, unsigned long *vsx)
677 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_CVSX, &iov);
686 int write_vsx(pid_t child, unsigned long *vsx)
690 ret = ptrace(PTRACE_SETVSRREGS, child, 0, vsx);
698 int write_vsx_ckpt(pid_t child, unsigned long *vsx)
707 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TM_CVSX, &iov);
716 int show_tm_spr(pid_t child, struct tm_spr_regs *out)
731 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TM_SPR, &iov);