Lines Matching refs:regs

32 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)  in pt_regs_to_gdb_regs()  argument
34 unsigned long ssp = (unsigned long) (regs + 1); in pt_regs_to_gdb_regs()
36 gdb_regs[GDB_FR_D0] = regs->d0; in pt_regs_to_gdb_regs()
37 gdb_regs[GDB_FR_D1] = regs->d1; in pt_regs_to_gdb_regs()
38 gdb_regs[GDB_FR_D2] = regs->d2; in pt_regs_to_gdb_regs()
39 gdb_regs[GDB_FR_D3] = regs->d3; in pt_regs_to_gdb_regs()
40 gdb_regs[GDB_FR_A0] = regs->a0; in pt_regs_to_gdb_regs()
41 gdb_regs[GDB_FR_A1] = regs->a1; in pt_regs_to_gdb_regs()
42 gdb_regs[GDB_FR_A2] = regs->a2; in pt_regs_to_gdb_regs()
43 gdb_regs[GDB_FR_A3] = regs->a3; in pt_regs_to_gdb_regs()
44 gdb_regs[GDB_FR_SP] = (regs->epsw & EPSW_nSL) ? regs->sp : ssp; in pt_regs_to_gdb_regs()
45 gdb_regs[GDB_FR_PC] = regs->pc; in pt_regs_to_gdb_regs()
46 gdb_regs[GDB_FR_MDR] = regs->mdr; in pt_regs_to_gdb_regs()
47 gdb_regs[GDB_FR_EPSW] = regs->epsw; in pt_regs_to_gdb_regs()
48 gdb_regs[GDB_FR_LIR] = regs->lir; in pt_regs_to_gdb_regs()
49 gdb_regs[GDB_FR_LAR] = regs->lar; in pt_regs_to_gdb_regs()
50 gdb_regs[GDB_FR_MDRQ] = regs->mdrq; in pt_regs_to_gdb_regs()
51 gdb_regs[GDB_FR_E0] = regs->e0; in pt_regs_to_gdb_regs()
52 gdb_regs[GDB_FR_E1] = regs->e1; in pt_regs_to_gdb_regs()
53 gdb_regs[GDB_FR_E2] = regs->e2; in pt_regs_to_gdb_regs()
54 gdb_regs[GDB_FR_E3] = regs->e3; in pt_regs_to_gdb_regs()
55 gdb_regs[GDB_FR_E4] = regs->e4; in pt_regs_to_gdb_regs()
56 gdb_regs[GDB_FR_E5] = regs->e5; in pt_regs_to_gdb_regs()
57 gdb_regs[GDB_FR_E6] = regs->e6; in pt_regs_to_gdb_regs()
58 gdb_regs[GDB_FR_E7] = regs->e7; in pt_regs_to_gdb_regs()
61 gdb_regs[GDB_FR_USP] = regs->sp; in pt_regs_to_gdb_regs()
62 gdb_regs[GDB_FR_MCRH] = regs->mcrh; in pt_regs_to_gdb_regs()
63 gdb_regs[GDB_FR_MCRL] = regs->mcrl; in pt_regs_to_gdb_regs()
64 gdb_regs[GDB_FR_MCVF] = regs->mcvf; in pt_regs_to_gdb_regs()
86 void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) in gdb_regs_to_pt_regs() argument
88 regs->d0 = gdb_regs[GDB_FR_D0]; in gdb_regs_to_pt_regs()
89 regs->d1 = gdb_regs[GDB_FR_D1]; in gdb_regs_to_pt_regs()
90 regs->d2 = gdb_regs[GDB_FR_D2]; in gdb_regs_to_pt_regs()
91 regs->d3 = gdb_regs[GDB_FR_D3]; in gdb_regs_to_pt_regs()
92 regs->a0 = gdb_regs[GDB_FR_A0]; in gdb_regs_to_pt_regs()
93 regs->a1 = gdb_regs[GDB_FR_A1]; in gdb_regs_to_pt_regs()
94 regs->a2 = gdb_regs[GDB_FR_A2]; in gdb_regs_to_pt_regs()
95 regs->a3 = gdb_regs[GDB_FR_A3]; in gdb_regs_to_pt_regs()
96 regs->sp = gdb_regs[GDB_FR_SP]; in gdb_regs_to_pt_regs()
97 regs->pc = gdb_regs[GDB_FR_PC]; in gdb_regs_to_pt_regs()
98 regs->mdr = gdb_regs[GDB_FR_MDR]; in gdb_regs_to_pt_regs()
99 regs->epsw = gdb_regs[GDB_FR_EPSW]; in gdb_regs_to_pt_regs()
100 regs->lir = gdb_regs[GDB_FR_LIR]; in gdb_regs_to_pt_regs()
101 regs->lar = gdb_regs[GDB_FR_LAR]; in gdb_regs_to_pt_regs()
102 regs->mdrq = gdb_regs[GDB_FR_MDRQ]; in gdb_regs_to_pt_regs()
103 regs->e0 = gdb_regs[GDB_FR_E0]; in gdb_regs_to_pt_regs()
104 regs->e1 = gdb_regs[GDB_FR_E1]; in gdb_regs_to_pt_regs()
105 regs->e2 = gdb_regs[GDB_FR_E2]; in gdb_regs_to_pt_regs()
106 regs->e3 = gdb_regs[GDB_FR_E3]; in gdb_regs_to_pt_regs()
107 regs->e4 = gdb_regs[GDB_FR_E4]; in gdb_regs_to_pt_regs()
108 regs->e5 = gdb_regs[GDB_FR_E5]; in gdb_regs_to_pt_regs()
109 regs->e6 = gdb_regs[GDB_FR_E6]; in gdb_regs_to_pt_regs()
110 regs->e7 = gdb_regs[GDB_FR_E7]; in gdb_regs_to_pt_regs()
111 regs->sp = gdb_regs[GDB_FR_SSP]; in gdb_regs_to_pt_regs()
114 regs->mcrh = gdb_regs[GDB_FR_MCRH]; in gdb_regs_to_pt_regs()
115 regs->mcrl = gdb_regs[GDB_FR_MCRL]; in gdb_regs_to_pt_regs()
116 regs->mcvf = gdb_regs[GDB_FR_MCVF]; in gdb_regs_to_pt_regs()
155 static int kgdb_arch_do_singlestep(struct pt_regs *regs) in kgdb_arch_do_singlestep() argument
159 u8 *pc = (u8 *)regs->pc, *sp = (u8 *)(regs + 1), cur; in kgdb_arch_do_singlestep()
188 if (regs->pc == regs->lar) in kgdb_arch_do_singlestep()
190 y = (u8 *)regs->lar; in kgdb_arch_do_singlestep()
219 x = (u8 *)regs->mdr; in kgdb_arch_do_singlestep()
240 case 0: x = (u8 *)regs->a0; break; in kgdb_arch_do_singlestep()
241 case 1: x = (u8 *)regs->a1; break; in kgdb_arch_do_singlestep()
242 case 2: x = (u8 *)regs->a2; break; in kgdb_arch_do_singlestep()
243 case 3: x = (u8 *)regs->a3; break; in kgdb_arch_do_singlestep()
360 static bool kgdb_arch_undo_singlestep(struct pt_regs *regs) in kgdb_arch_undo_singlestep() argument
368 if (x == (u8 *)regs->pc) in kgdb_arch_undo_singlestep()
378 if (y == (u8 *)regs->pc) in kgdb_arch_undo_singlestep()
418 struct pt_regs *regs) in kgdb_arch_handle_exception() argument
429 regs->pc = addr; in kgdb_arch_handle_exception()
435 kgdb_arch_do_singlestep(regs); in kgdb_arch_handle_exception()
450 struct pt_regs *regs) in debugger_intercept() argument
454 if (kgdb_arch_undo_singlestep(regs)) { in debugger_intercept()
460 ret = kgdb_handle_exception(excep, signo, si_code, regs); in debugger_intercept()
470 int at_debugger_breakpoint(struct pt_regs *regs) in at_debugger_breakpoint() argument
472 return regs->pc == (unsigned long)&__arch_kgdb_breakpoint; in at_debugger_breakpoint()
491 void debugger_nmi_interrupt(struct pt_regs *regs, enum exception_code code) in debugger_nmi_interrupt() argument
493 kgdb_nmicallback(arch_smp_processor_id(), regs); in debugger_nmi_interrupt()