Lines Matching refs:linux_regs
48 static short *get_step_address(struct pt_regs *linux_regs) in get_step_address() argument
50 insn_size_t op = __raw_readw(linux_regs->pc); in get_step_address()
55 if (linux_regs->sr & SR_T_BIT_MASK) in get_step_address()
56 addr = linux_regs->pc + 4 + OPCODE_BTF_DISP(op); in get_step_address()
58 addr = linux_regs->pc + 2; in get_step_address()
63 if (linux_regs->sr & SR_T_BIT_MASK) in get_step_address()
64 addr = linux_regs->pc + 4 + OPCODE_BTF_DISP(op); in get_step_address()
66 addr = linux_regs->pc + 4; /* Not in delay slot */ in get_step_address()
71 if (!(linux_regs->sr & SR_T_BIT_MASK)) in get_step_address()
72 addr = linux_regs->pc + 4 + OPCODE_BTF_DISP(op); in get_step_address()
74 addr = linux_regs->pc + 2; in get_step_address()
79 if (!(linux_regs->sr & SR_T_BIT_MASK)) in get_step_address()
80 addr = linux_regs->pc + 4 + OPCODE_BTF_DISP(op); in get_step_address()
82 addr = linux_regs->pc + 4; /* Not in delay slot */ in get_step_address()
87 addr = linux_regs->pc + 4 + OPCODE_BRA_DISP(op); in get_step_address()
91 addr = linux_regs->pc + 4 in get_step_address()
92 + linux_regs->regs[OPCODE_BRAF_REG(op)]; in get_step_address()
96 addr = linux_regs->pc + 4 + OPCODE_BSR_DISP(op); in get_step_address()
100 addr = linux_regs->pc + 4 in get_step_address()
101 + linux_regs->regs[OPCODE_BSRF_REG(op)]; in get_step_address()
105 addr = linux_regs->regs[OPCODE_JMP_REG(op)]; in get_step_address()
109 addr = linux_regs->regs[OPCODE_JSR_REG(op)]; in get_step_address()
113 addr = linux_regs->pr; in get_step_address()
117 addr = linux_regs->regs[15]; in get_step_address()
121 addr = linux_regs->pc + instruction_size(op); in get_step_address()
139 static void do_single_step(struct pt_regs *linux_regs) in do_single_step() argument
142 unsigned short *addr = get_step_address(linux_regs); in do_single_step()
156 static void undo_single_step(struct pt_regs *linux_regs) in undo_single_step() argument
255 struct pt_regs *linux_regs) in kgdb_arch_handle_exception() argument
261 undo_single_step(linux_regs); in kgdb_arch_handle_exception()
269 linux_regs->pc = addr; in kgdb_arch_handle_exception()
275 do_single_step(linux_regs); in kgdb_arch_handle_exception()