Lines Matching full:child

32 static unsigned long get_pseudo_pc(struct task_struct *child);
81 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument
89 if (!get_reg(child, PT_SPC)) { in user_enable_single_step()
91 tmp = get_reg(child, PT_ERP) & ~1; in user_enable_single_step()
92 put_reg(child, PT_SPC, tmp); in user_enable_single_step()
94 tmp = get_reg(child, PT_CCS) | SBIT_USER; in user_enable_single_step()
95 put_reg(child, PT_CCS, tmp); in user_enable_single_step()
98 void user_disable_single_step(struct task_struct *child) in user_disable_single_step() argument
100 put_reg(child, PT_SPC, 0); in user_disable_single_step()
102 if (!get_debugreg(child->pid, PT_BP_CTRL)) { in user_disable_single_step()
105 tmp = get_reg(child, PT_CCS) & ~SBIT_USER; in user_disable_single_step()
106 put_reg(child, PT_CCS, tmp); in user_disable_single_step()
116 ptrace_disable(struct task_struct *child) in ptrace_disable() argument
121 user_disable_single_step(child); in ptrace_disable()
122 put_reg(child, PT_SPC, 0); in ptrace_disable()
124 /* Deconfigure any watchpoints associated with the child. */ in ptrace_disable()
125 deconfigure_bp(child->pid); in ptrace_disable()
129 long arch_ptrace(struct task_struct *child, long request, in arch_ptrace() argument
153 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); in arch_ptrace()
171 tmp = get_reg(child, regno); in arch_ptrace()
179 ret = generic_ptrace_pokedata(child, addr, data); in arch_ptrace()
193 data |= get_reg(child, PT_CCS) & ~CCS_MASK; in arch_ptrace()
195 if (put_reg(child, regno, data)) in arch_ptrace()
200 /* Get all GP registers from the child. */ in arch_ptrace()
206 tmp = get_reg(child, i); in arch_ptrace()
220 /* Set all GP registers in the child. */ in arch_ptrace()
233 tmp |= get_reg(child, PT_CCS) & ~CCS_MASK; in arch_ptrace()
236 put_reg(child, i, tmp); in arch_ptrace()
245 ret = ptrace_request(child, request, addr, data); in arch_ptrace()
278 static int insn_size(struct task_struct *child, unsigned long pc) in insn_size() argument
285 copied = access_process_vm(child, pc, &opcode, sizeof(opcode), 0); in insn_size()
314 static unsigned long get_pseudo_pc(struct task_struct *child) in get_pseudo_pc() argument
317 unsigned long pc = get_reg(child, PT_ERP); in get_pseudo_pc()
320 unsigned long spc = get_reg(child, PT_SPC); in get_pseudo_pc()
331 pc += insn_size(child, pc & ~1) - 1; in get_pseudo_pc()