]> granicus.if.org Git - strace/commitdiff
POWERPC: read ppc_regs.nip if -i
authorDenys Vlasenko <dvlasenk@redhat.com>
Fri, 28 Jun 2013 12:51:50 +0000 (14:51 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Fri, 28 Jun 2013 12:51:50 +0000 (14:51 +0200)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
syscall.c

index a44ac0c49404dc128ef376afe3d3a581047d66f5..07270723b1b00a62f5586a8ce5f3619388d7cb7d 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -1004,9 +1004,16 @@ static int powerpc_getregs_old(pid_t pid)
        int i;
        long r;
 
+       if (iflag) {
+               r = upeek(pid, sizeof(long) * PT_NIP, &ppc_regs.nip);
+               if (r)
+                       goto out;
+       }
+#ifdef POWERPC64 /* else we never use it */
        r = upeek(pid, sizeof(long) * PT_MSR, &ppc_regs.msr);
        if (r)
                goto out;
+#endif
        r = upeek(pid, sizeof(long) * PT_CCR, &ppc_regs.ccr);
        if (r)
                goto out;