powerpc: Use PTRACE_GETREGS to fetch all registers

* defs.h: declare ppc_regs and get_regs_error.
* signal.c (sys_sigreturn): Use ppc_regs instead of upeek.
* syscall.c: define ppc_regs.
(printcall): Use ppc_regs instead of upeek.
(get_scno): Replace multiple upeek calls with one PTRACE_GETREGS call.
(get_syscall_result): Likewise.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/signal.c b/signal.c
index 55815aa..3371ee7 100644
--- a/signal.c
+++ b/signal.c
@@ -866,8 +866,9 @@
 		long esp;
 		struct sigcontext_struct sc;
 		sigset_t sigm;
-		if (upeek(tcp, sizeof(unsigned long) * PT_R1, &esp) < 0)
-			return 0;
+
+		esp = ppc_regs.gpr[1];
+
 		/* Skip dummy stack frame. */
 #ifdef POWERPC64
 		if (current_personality == 0)