syscall.c will not build under mips-n32 or mips-n64.

In syscall_enter() there is a call to ptrace() with an undefined variable 'pid'. This should be replaced with 'tcp->pid'. Attached is a patch that fixes the issue for me.

Please apply if approved.

Thanks,

2010-02-09  David Daney  <dda...@caviumnetworks.com>

        * syscall.c (syscall_enter): Pass tcp->pid to ptrace
        in MIPS-n32/MIPS-n64 case.
--- strace-4.5.19/syscall.c     2009-10-12 12:54:21.000000000 -0700
+++ strace-4.5.19-dd/syscall.c  2010-02-09 10:38:51.000000000 -0800
@@ -2035,7 +2035,7 @@
                else
                        nargs = tcp->u_nargs = MAX_ARGS;
 
-               if (ptrace (PTRACE_GETREGS, pid, NULL, (long) &regs) < 0)
+               if (ptrace (PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
                        return -1;
 
                for(i = 0; i < nargs; i++) {
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to