When switching threads, use the correct registers.

Index: gdb/ppc-obsd-nat.c
--- gdb/ppc-obsd-nat.c.orig
+++ gdb/ppc-obsd-nat.c
@@ -81,7 +81,7 @@ void
 ppc_obsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
 {
   struct reg regs;
-  pid_t pid = regcache->ptid ().pid ();
+  pid_t pid = get_ptrace_pid (regcache->ptid ());
 
   if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
     perror_with_name (_("Couldn't get registers"));
@@ -115,7 +115,7 @@ void
 ppc_obsd_nat_target::store_registers (struct regcache *regcache, int regnum)
 {
   struct reg regs;
-  pid_t pid = regcache->ptid ().pid ();
+  pid_t pid = get_ptrace_pid (regcache->ptid ());
 
   if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
     perror_with_name (_("Couldn't get registers"));
