From: NIIBE Y. <gn...@ch...> - 2000-06-08 09:30:21
|
ptrace does not work yet. We need following patch. But still GDB not worked. -------------------------- 2000-06-08 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/ptrace.c (sys_ptrace): Bug fix. Change the last argument of access_process_vm. (ubc_set_tracing): Handle SH7709's UBC. I don't know it's right. I see SH7729 manual. Index: arch/sh/kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/ptrace.c,v retrieving revision 1.5 diff -u -r1.5 ptrace.c --- arch/sh/kernel/ptrace.c 2000/05/09 01:42:21 1.5 +++ arch/sh/kernel/ptrace.c 2000/06/08 09:21:46 @@ -10,6 +10,7 @@ * */ +#include <linux/config.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/mm.h> @@ -121,13 +122,21 @@ { ctrl_outl(nextpc1, UBC_BARA); ctrl_outb(asid, UBC_BASRA); +#if defined(CONFIG_CPU_SUBTYPE_SH7709) + ctrl_outl(0x0fff, UBC_BAMRA); +#else ctrl_outb(BAMR_12, UBC_BAMRA); +#endif ctrl_outw(BBR_INST | BBR_READ, UBC_BBRA); if (nextpc2 != (unsigned long) -1) { ctrl_outl(nextpc2, UBC_BARB); ctrl_outb(asid, UBC_BASRB); +#if defined(CONFIG_CPU_SUBTYPE_SH7709) + ctrl_outl(0x0fff, UBC_BAMRA); +#else ctrl_outb(BAMR_12, UBC_BAMRB); +#endif ctrl_outw(BBR_INST | BBR_READ, UBC_BBRB); } ctrl_outw(BRCR_PCBA | BRCR_PCBB, UBC_BRCR); @@ -322,7 +331,7 @@ /* Compute next pc. */ pc = get_stack_long(child, (long)&dummy->pc); regs = (struct pt_regs *)((unsigned long)child + THREAD_SIZE - sizeof(struct pt_regs)); - if (access_process_vm(child, pc&~3, &tmp, sizeof(tmp), 1) != sizeof(data)) + if (access_process_vm(child, pc&~3, &tmp, sizeof(tmp), 0) != sizeof(tmp)) break; #ifdef __LITTLE_ENDIAN__ |