]> granicus.if.org Git - strace/commitdiff
2002-12-15 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Mon, 16 Dec 2002 20:40:48 +0000 (20:40 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 16 Dec 2002 20:40:48 +0000 (20:40 +0000)
* process.c (setarg) [POWERPC]: Support it.

process.c

index c6d5ee2d95c722cc40e793b330607f4a12f27c2c..6a68316d0d13245f0323b71eb6d4a7dc133f1949 100644 (file)
--- a/process.c
+++ b/process.c
@@ -592,6 +592,17 @@ setarg(tcp, argnum)
                if (errno)
                        return -1;
        }
+#elif defined(POWERPC)
+#ifndef PT_ORIG_R3
+#define PT_ORIG_R3 34
+#endif
+       {
+               ptrace(PTRACE_POKEUSER, tcp->pid,
+                      (char*)((argnum==0 ? PT_ORIG_R3 : argnum+PT_R3)*4),
+                      tcp->u_arg[argnum]);
+               if (errno)
+                       return -1;
+       }
 #elif defined(MIPS)
        {
                errno = 0;