Index: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc =================================================================== --- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc +++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ptrace.cc @@ -19,8 +19,10 @@ execl("/bin/true", "true", NULL); } else { wait(NULL); - user_regs_struct regs; int res; + +#if __x86_64__ + user_regs_struct regs; res = ptrace(PTRACE_GETREGS, pid, NULL, ®s); assert(!res); if (regs.rip) @@ -31,6 +33,21 @@ assert(!res); if (fpregs.mxcsr) printf("%x\n", fpregs.mxcsr); +#endif // __x86_64__ + +#if __powerpc64__ + struct pt_regs regs; + res = ptrace((enum __ptrace_request)PTRACE_GETREGS, pid, NULL, ®s); + assert(!res); + if (regs.nip) + printf("%lx\n", regs.nip); + + elf_fpregset_t fpregs; + res = ptrace((enum __ptrace_request)PTRACE_GETFPREGS, pid, NULL, &fpregs); + assert(!res); + if ((elf_greg_t)fpregs[32]) // fpscr + printf("%lx\n", (elf_greg_t)fpregs[32]); +#endif // __powerpc64__ siginfo_t siginfo; res = ptrace(PTRACE_GETSIGINFO, pid, NULL, &siginfo);