Subject: R3000 and kgdb

From: Alice Hennessy <[email-masked]>
Date: Wed, 18 Jul 2001 19:58:47 -0700

Has anyone used kgdb with an R3000 cpu?   There was an obvious problem
in
gdb-low.S (patch below) but I still cannot get kgdb to work.

Alice

--- arch/mips/kernel/gdb-low.S.orig     Wed Jul 18 18:47:57 2001
+++ arch/mips/kernel/gdb-low.S  Wed Jul 18 17:52:21 2001
@@ -302,11 +302,18 @@
                lw      v1,GDB_FR_REG3(sp)
                lw      v0,GDB_FR_REG2(sp)
                lw      $1,GDB_FR_REG1(sp)
+#if defined(CONFIG_CPU_R3000)
+                lw      k0, GDB_FR_EPC(sp)
+                lw      sp,GDB_FR_REG29(sp)             /* Deallocate
stack */
+                jr      k0
+                rfe
+#else
                lw      sp,GDB_FR_REG29(sp)             /* Deallocate
stack */

                .set    mips3
                eret
                .set    mips0
+#endif
                .set    at
                .set    reorder
                END(trap_low)

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 19 Jul 2001 12:35:02 +0200

Alice,

On Wed, Jul 18, 2001 at 07:58:47PM -0700, Alice Hennessy wrote:

> in gdb-low.S (patch below) but I still cannot get kgdb to work.

Your patch looks good, so I've applied it.

In the future please do not send patches using Netscape; it garbles patches
such that they can only applied manually which would force me to refuse any
larger patch.  Some MUA like Mutt or Pine won't trash patches.

  Ralf