Date: Tue, 23 Mar 2010 00:31:56 +0000 (UTC) From: Juli Mallett <jmallett@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r205494 - user/jmallett/octeon/lib/libc/mips/sys Message-ID: <201003230031.o2N0VuJa086660@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003230031.o2N0VuJa086660>