Lines Matching +full:no +full:- +full:pc +full:- +full:write

1 // SPDX-License-Identifier: GPL-2.0
48 * Processes always block with the following stack-layout:
50 * +================================+ <---- task + 2*PAGE_SIZE
51 * | PALcode saved frame (ps, pc, | ^
66 * which the register is saved. Register indices are 0-31 for integer
67 * regs, 32-63 for fp regs, and 64 for the pc. Notice that sp and
68 * zero have no stack-slot and need to be treated specially (see
76 (PAGE_SIZE*2 - sizeof(struct pt_regs) + offsetof(struct pt_regs, reg))
79 (PAGE_SIZE*2 - sizeof(struct pt_regs) - sizeof(struct switch_stack) \
90 PT_REG( r28), PT_REG( gp), -1, -1,
99 PT_REG( pc)
113 addr = &task_thread_info(task)->pcb.usp; in get_reg_addr()
115 addr = &task_thread_info(task)->pcb.unique; in get_reg_addr()
131 /* Special hack for fpcr -- combine hardware and software bits. */ in get_reg()
135 = task_thread_info(task)->ieee_state & IEEE_SW_MASK; in get_reg()
143 * Write contents of register REGNO in task TASK.
149 task_thread_info(task)->ieee_state in put_reg()
150 = ((task_thread_info(task)->ieee_state & ~IEEE_SW_MASK) in put_reg()
163 return (copied == sizeof(int)) ? 0 : -EIO; in read_int()
171 return (copied == sizeof(int)) ? 0 : -EIO; in write_int()
182 unsigned long pc; in ptrace_set_bpt() local
184 pc = get_reg(child, REG_PC); in ptrace_set_bpt()
185 res = read_int(child, pc, (int *) &insn); in ptrace_set_bpt()
200 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt()
202 task_thread_info(child)->bpt_addr[nsaved++] in ptrace_set_bpt()
203 = pc + 4 + displ; in ptrace_set_bpt()
207 task_thread_info(child)->bpt_addr[nsaved++] = get_reg(child, reg_b); in ptrace_set_bpt()
210 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt()
216 res = read_int(child, task_thread_info(child)->bpt_addr[i], in ptrace_set_bpt()
220 task_thread_info(child)->bpt_insn[i] = insn; in ptrace_set_bpt()
221 DBG(DBG_BPT, (" -> next_pc=%lx\n", in ptrace_set_bpt()
222 task_thread_info(child)->bpt_addr[i])); in ptrace_set_bpt()
223 res = write_int(child, task_thread_info(child)->bpt_addr[i], in ptrace_set_bpt()
228 task_thread_info(child)->bpt_nsaved = nsaved; in ptrace_set_bpt()
233 * Ensure no single-step breakpoint is pending. Returns non-zero
234 * value if child was being single-stepped.
239 int i, nsaved = task_thread_info(child)->bpt_nsaved; in ptrace_cancel_bpt()
241 task_thread_info(child)->bpt_nsaved = 0; in ptrace_cancel_bpt()
249 write_int(child, task_thread_info(child)->bpt_addr[i], in ptrace_cancel_bpt()
250 task_thread_info(child)->bpt_insn[i]); in ptrace_cancel_bpt()
258 task_thread_info(child)->bpt_nsaved = -1; in user_enable_single_step()
289 ret = -EIO; in arch_ptrace()
301 DBG(DBG_MEM, ("peek $%lu->%#lx\n", addr, ret)); in arch_ptrace()
305 case PTRACE_POKETEXT: /* write the word at location addr. */ in arch_ptrace()
310 case PTRACE_POKEUSR: /* write the specified register */ in arch_ptrace()
311 DBG(DBG_MEM, ("poke $%lu<-%#lx\n", addr, data)); in arch_ptrace()
327 ret = -1UL; in syscall_trace_enter()
328 audit_syscall_entry(regs->r0, regs->r16, regs->r17, regs->r18, regs->r19); in syscall_trace_enter()
329 return ret ?: current_pt_regs()->r0; in syscall_trace_enter()