Linux MIPS Architecture development
 help / color / mirror / Atom feed
* MIPS64 syscall trace patch
@ 2003-12-04 16:53 Daniel Jacobowitz
  0 siblings, 0 replies; only message in thread
From: Daniel Jacobowitz @ 2003-12-04 16:53 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips

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
diff -u -p -r1.20.2.18 scall_64.S
--- arch/mips64/kernel/scall_64.S	28 Oct 2003 13:39:37 -0000	1.20.2.18
+++ arch/mips64/kernel/scall_64.S	4 Dec 2003 16:51:01 -0000
@@ -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
diff -u -p -r1.2.2.14 scall_n32.S
--- arch/mips64/kernel/scall_n32.S	9 Oct 2003 15:42:33 -0000	1.2.2.14
+++ arch/mips64/kernel/scall_n32.S	4 Dec 2003 16:51:01 -0000
@@ -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?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-04 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-04 16:53 MIPS64 syscall trace patch Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox