After a memory fault caused by a kgdb access (in kgdb_mem2hex for
example) the kgdb_fault_setjmp/longjmp routines are used to recover from
the fault.  On ARM, when kgdb_fault_longjmp restores the state, it does
not properly restore the CPSR saved by kgdb_fault_setjmp before the
fault.  Here's a patch to properly restore CPSR.

The patch below is from 2.6.10, but this code hasn't changed since 2.4
so should apply to any kernel.

Kevin


Index: linux-2.6.10/arch/arm/kernel/kgdb-jmp.S
===================================================================
--- linux-2.6.10.orig/arch/arm/kernel/kgdb-jmp.S
+++ linux-2.6.10/arch/arm/kernel/kgdb-jmp.S
@@ -27,4 +27,6 @@ ENTRY (kgdb_fault_longjmp)
        /* Restore registers */
        mov     r1,#1
        str     r1,[r0]
+       ldr     r1,[r0, #64]
+       msr     spsr,r1
        ldmia   r0,{r0-pc}^



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to