10 #include <asm/cacheflush.h>
11 #include <asm/kdebug.h>
12 #include <asm/ptrace.h>
17 struct reg_window *
win;
21 for (i = 0; i < 15; i++)
25 for (i = 0; i < 8; i++)
26 gdb_regs[
GDB_L0 + i] = win->locals[i];
27 for (i = 0; i < 8; i++)
28 gdb_regs[
GDB_I0 + i] = win->ins[i];
33 gdb_regs[
GDB_PC] = regs->tpc;
44 extern unsigned int switch_to_pc;
46 struct reg_window *
win;
47 unsigned long pc, cwp;
59 win = (
struct reg_window *) (t->ksp +
STACK_BIAS);
60 for (i = 0; i < 8; i++)
61 gdb_regs[
GDB_L0 + i] = win->locals[i];
62 for (i = 0; i < 8; i++)
63 gdb_regs[
GDB_I0 + i] = win->ins[i];
69 pc = (
unsigned long) &ret_from_syscall;
71 pc = (
unsigned long) &switch_to_pc;
76 cwp = __thread_flag_byte_ptr(t)[TI_FLAG_BYTE_CWP];
86 struct reg_window *
win;
89 for (i = 0; i < 15; i++)
101 regs->tpc = gdb_regs[
GDB_PC];
102 regs->tnpc = gdb_regs[
GDB_NPC];
103 regs->
y = gdb_regs[
GDB_Y];
106 for (i = 0; i < 8; i++)
107 win->locals[i] = gdb_regs[
GDB_L0 + i];
108 for (i = 0; i < 8; i++)
109 win->ins[i] = gdb_regs[
GDB_I0 + i];
117 __asm__ __volatile__(
"rdpr %%pstate, %0\n\t"
118 "wrpr %0, %1, %%pstate"
127 __asm__ __volatile__(
"wrpr %0, 0, %%pstate"
133 char *remcomInBuffer,
char *remcomOutBuffer,
139 switch (remcomInBuffer[0]) {
142 ptr = &remcomInBuffer[1];
144 linux_regs->tpc =
addr;
145 linux_regs->tnpc = addr + 4;
152 linux_regs->tpc = linux_regs->tnpc;
153 linux_regs->tnpc += 4;
188 regs->tnpc = regs->tpc + 4;
193 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 },