]> granicus.if.org Git - strace/commitdiff
2003-01-10 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Fri, 10 Jan 2003 11:14:41 +0000 (11:14 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 10 Jan 2003 11:14:41 +0000 (11:14 +0000)
* process.c (change_syscall) [POWERPC]: Add missing return.
* util.c [POWERPC] (arg0_offset): Set to 4*PT_R3, not 4*PT_ORIG_R3.

process.c
util.c

index 1212ff7b8e8b24c425bbb348621e7d615fac2e23..965822ca0e5f3786e1fca8c93381f2c607db4575 100644 (file)
--- a/process.c
+++ b/process.c
@@ -609,6 +609,7 @@ int new;
 #elif defined(POWERPC)
        if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_R0), new) < 0)
                return -1;
+       return 0;
 #elif defined(S390) || defined(S390X)
        /* s390 linux after 2.4.7 has a hook in entry.S to allow this */
        if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR2), new)<0)
diff --git a/util.c b/util.c
index 675fcb1df6dfae9f1edac7f4b1842e35c8aee047..16bff2bcb66acfddeb770ea9c89535ff235bfc2f 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1200,8 +1200,8 @@ typedef struct regs arg_setup_state;
 #  define arg0_offset  REG_A0
 #  define arg1_offset  (REG_A0+1)
 # elif defined (POWERPC)
-#  define arg0_offset  (4*PT_ORIG_R3)
-#  define arg1_offset  (4*(1+PT_R3))
+#  define arg0_offset  (4*PT_R3)
+#  define arg1_offset  (4*PT_R4)
 # elif defined (HPPA)
 #  define arg0_offset   PT_GR26
 #  define arg1_offset   (PT_GR26-4)