svn commit: r205494 - user/jmallett/octeon/lib/libc/mips/sys
Juli Mallett
jmallett at FreeBSD.org
Tue Mar 23 00:31:56 UTC 2010
Author: jmallett
Date: Tue Mar 23 00:31:56 2010
New Revision: 205494
URL: http://svn.freebsd.org/changeset/base/205494
Log:
o) Load the address of cerror into t9 before restoring the gp and sp. We waste
the load in the case of no error in exchange for not duplicating the gp and
sp restore code.
o) Don't overwrite ra when calling cerror -- jr not jalr.
This makes truss work.
Sponsored by: Packet Forensics.
Modified:
user/jmallett/octeon/lib/libc/mips/sys/ptrace.S
Modified: user/jmallett/octeon/lib/libc/mips/sys/ptrace.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/sys/ptrace.S Mon Mar 22 23:33:40 2010 (r205493)
+++ user/jmallett/octeon/lib/libc/mips/sys/ptrace.S Tue Mar 23 00:31:56 2010 (r205494)
@@ -59,13 +59,13 @@ NESTED_NOPROFILE(ptrace, CALLFRAME_SIZ,
li v0, SYS_ptrace
syscall
+ # Load __cerror's address using our gp, then restore it.
+ PTR_LA t9, __cerror
RESTORE_GP64
PTR_ADDU sp, sp, CALLFRAME_SIZ
bne a3, zero, 1f
j ra
-1:
- PTR_LA t9, __cerror
- jalr t9
+1: j t9
END(ptrace)
More information about the svn-src-user
mailing list