Lines Matching refs:child

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