From: Denys Vlasenko Date: Fri, 28 Jun 2013 12:51:50 +0000 (+0200) Subject: POWERPC: read ppc_regs.nip if -i X-Git-Tag: v4.9~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b3016e43512e055eb42cf03194eb4c6eee17841;p=strace POWERPC: read ppc_regs.nip if -i Signed-off-by: Denys Vlasenko --- diff --git a/syscall.c b/syscall.c index a44ac0c4..07270723 100644 --- 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;