diff -ur strace-4.5.19/syscall.c strace-4.5.19.fix/syscall.c
--- 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) &regs) < 0)
+		if (ptrace (PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
 			return -1;
 
 		for(i = 0; i < nargs; i++) {
