linux-mips
[Top] [All Lists]

LO reg. gets trashed by kgdb in 2.4.x and older kernels

To: linux-mips@ftp.linux-mips.org
Subject: LO reg. gets trashed by kgdb in 2.4.x and older kernels
From: Sergei Shtylyov <sshtylyov@dev.rtsoft.ru>
Date: Mon, 05 Jul 2004 19:05:14 +0400
Organization: RTSoft, Inc.
Original-recipient: rfc822;linux-mips@ftp.linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.6) Gecko/20040113
Hi.

I have discovered that the gdb-low.S trashes the LO reg. instead of restoring it. This was fixed for the 2.6 kernels but, as it seems, was left unfixed in the earlier ones (run into this on 2.4.18/2.4.20). Here's the patch
against the lastest 2.4.x revision of the file...

Index: linux/arch/mips/kernel/gdb-low.S
===================================================================
RCS file: /home/cvs/linux/arch/mips/kernel/gdb-low.S,v
retrieving revision 1.11.2.3
diff -a -u -r1.11.2.3 gdb-low.S
--- linux/arch/mips/kernel/gdb-low.S    20 Feb 2003 18:19:01 -0000      1.11.2.3
+++ linux/arch/mips/kernel/gdb-low.S    5 Jul 2004 14:48:08 -0000
@@ -283,7 +283,7 @@
                lw      v0,GDB_FR_HI(sp)
                lw      v1,GDB_FR_LO(sp)
                mthi    v0
-               mtlo    v0
+               mtlo    v1
                lw      ra,GDB_FR_REG31(sp)
                lw      fp,GDB_FR_REG30(sp)
                lw      gp,GDB_FR_REG28(sp)


<Prev in Thread] Current Thread [Next in Thread>