Lines Matching +full:no +full:- +full:pc +full:- +full:write
1 // SPDX-License-Identifier: GPL-2.0
47 * Processes always block with the following stack-layout:
49 * +================================+ <---- task + 2*PAGE_SIZE
50 * | PALcode saved frame (ps, pc, | ^
65 * which the register is saved. Register indices are 0-31 for integer
66 * regs, 32-63 for fp regs, and 64 for the pc. Notice that sp and
67 * zero have no stack-slot and need to be treated specially (see
75 (PAGE_SIZE*2 - sizeof(struct pt_regs) + offsetof(struct pt_regs, reg))
78 (PAGE_SIZE*2 - sizeof(struct pt_regs) - sizeof(struct switch_stack) \
91 PT_REG( r28), PT_REG( gp), -1, -1,
100 PT_REG( pc)
114 addr = &task_thread_info(task)->pcb.usp; in get_reg_addr()
116 addr = &task_thread_info(task)->pcb.unique; in get_reg_addr()
132 /* Special hack for fpcr -- combine hardware and software bits. */ in get_reg()
136 = task_thread_info(task)->ieee_state & IEEE_SW_MASK; in get_reg()
144 * Write contents of register REGNO in task TASK.
150 task_thread_info(task)->ieee_state in put_reg()
151 = ((task_thread_info(task)->ieee_state & ~IEEE_SW_MASK) in put_reg()
164 return (copied == sizeof(int)) ? 0 : -EIO; in read_int()
172 return (copied == sizeof(int)) ? 0 : -EIO; in write_int()
183 unsigned long pc; in ptrace_set_bpt() local
185 pc = get_reg(child, REG_PC); in ptrace_set_bpt()
186 res = read_int(child, pc, (int *) &insn); in ptrace_set_bpt()
201 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt()
203 task_thread_info(child)->bpt_addr[nsaved++] in ptrace_set_bpt()
204 = pc + 4 + displ; in ptrace_set_bpt()
208 task_thread_info(child)->bpt_addr[nsaved++] = get_reg(child, reg_b); in ptrace_set_bpt()
211 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt()
217 res = read_int(child, task_thread_info(child)->bpt_addr[i], in ptrace_set_bpt()
221 task_thread_info(child)->bpt_insn[i] = insn; in ptrace_set_bpt()
222 DBG(DBG_BPT, (" -> next_pc=%lx\n", in ptrace_set_bpt()
223 task_thread_info(child)->bpt_addr[i])); in ptrace_set_bpt()
224 res = write_int(child, task_thread_info(child)->bpt_addr[i], in ptrace_set_bpt()
229 task_thread_info(child)->bpt_nsaved = nsaved; in ptrace_set_bpt()
234 * Ensure no single-step breakpoint is pending. Returns non-zero
235 * value if child was being single-stepped.
240 int i, nsaved = task_thread_info(child)->bpt_nsaved; in ptrace_cancel_bpt()
242 task_thread_info(child)->bpt_nsaved = 0; in ptrace_cancel_bpt()
250 write_int(child, task_thread_info(child)->bpt_addr[i], in ptrace_cancel_bpt()
251 task_thread_info(child)->bpt_insn[i]); in ptrace_cancel_bpt()
259 task_thread_info(child)->bpt_nsaved = -1; in user_enable_single_step()
290 ret = -EIO; in arch_ptrace()
302 DBG(DBG_MEM, ("peek $%lu->%#lx\n", addr, ret)); in arch_ptrace()
306 case PTRACE_POKETEXT: /* write the word at location addr. */ in arch_ptrace()
311 case PTRACE_POKEUSR: /* write the specified register */ in arch_ptrace()
312 DBG(DBG_MEM, ("poke $%lu<-%#lx\n", addr, data)); in arch_ptrace()
328 ret = -1UL; in syscall_trace_enter()
329 audit_syscall_entry(regs->r0, regs->r16, regs->r17, regs->r18, regs->r19); in syscall_trace_enter()
330 return ret ?: current_pt_regs()->r0; in syscall_trace_enter()