On Wed, 17 Mar 2010 20:07:58 +0100, Jan Rovins wrote:
> Got the following error when cross building strace for mips64,
>
> The attached patch fixes this, the patch should go upstream too.
...
> --- strace-4.5.19/syscall.c 2009-10-12 15:54:21.000000000 -0400
> +++ strace-4.5.19.fix/syscall.c 2010-03-17 14:47:17.000000000 -0400
> @@ -2035,7 +2035,7 @@
> else
> nargs = tcp->u_nargs = MAX_ARGS;
>
> - if (ptrace (PTRACE_GETREGS, pid, NULL, (long) ®s) < 0)
> + if (ptrace (PTRACE_GETREGS, tcp->pid, NULL, (long) ®s) < 0)
> return -1;
>
> for(i = 0; i < nargs; i++) {
this patch seems to be already applied in HEAD:
https://sourceforge.net/mailarchive/message.php?msg_name=4B71B17F.6030607%40caviumnetworks.com
https://sourceforge.net/projects/strace/develop
git clone git://strace.git.sourceforge.net/gitroot/strace/strace
Regards,
Jan
commit 200370419bb3540e50e9333a3359af4ca681d3bf
Author: David Daney <[email protected]>
Date: Tue Feb 9 21:22:30 2010 +0000
Fix MIPS N32/N64 compile error
* syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass
tcp->pid to ptrace().
diff --git a/syscall.c b/syscall.c
index 4f46bf6..a56d7df 100644
--- a/syscall.c
+++ b/syscall.c
@@ -2057,7 +2057,7 @@ syscall_enter(struct tcb *tcp)
else
nargs = tcp->u_nargs = MAX_ARGS;
- if (ptrace (PTRACE_GETREGS, pid, NULL, (long) ®s) < 0)
+ if (ptrace (PTRACE_GETREGS, tcp->pid, NULL, (long) ®s) < 0)
return -1;
for(i = 0; i < nargs; i++) {
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel