MIPS64 syscall trace patch
You need this do use PTRACE_SYSCALL on a 64-bit process. Otherwise mmap()'s last argument gets corrupted by syscall_trace(). Strace itself doesn't work yet, but I'm making progress...
This is for 2.4. 2.6 patch will follow in a sec.
Index: arch/mips64/kernel/scall_64.S
===================================================================
RCS file: /home/cvs/linux/arch/mips64/kernel/Attic/scall_64.S,v retrieving revision 1.20.2.18
mips64/kernel/scall_64.S +2 -0
@@ -108,6 +108,8 @@ trace_a_syscall: ld a1, PT_R5(sp) ld a2, PT_R6(sp) ld a3, PT_R7(sp) + ld a4, PT_R8(sp) + ld a5, PT_R9(sp) jalr t2 li t0, -EMAXERRNO - 1 # error?
Index: arch/mips64/kernel/scall_n32.S
===================================================================
RCS file: /home/cvs/linux/arch/mips64/kernel/Attic/scall_n32.S,v retrieving revision 1.2.2.14
mips64/kernel/scall_n32.S +2 -0
@@ -111,6 +111,8 @@ trace_a_syscall: ld a1, PT_R5(sp) ld a2, PT_R6(sp) ld a3, PT_R7(sp) + ld a4, PT_R8(sp) + ld a5, PT_R9(sp) jalr t2 li t0, -EMAXERRNO - 1 # error?
Signature · 2 lines
Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer