* linux-ppc-low.c (ppc_arch_setup): Adjust to regcache
authorPedro Alves <palves@redhat.com>
Thu, 21 Jan 2010 22:10:18 +0000 (22:10 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 21 Jan 2010 22:10:18 +0000 (22:10 +0000)
          changes.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-ppc-low.c

index fead2ddcc02bd965c1b89fe744b8dc14bc184bd1..e1ad397d5b797b660f1cb804d0e31d65c52eb76e 100644 (file)
@@ -1,3 +1,7 @@
+2010-01-21  Pedro Alves  <pedro@codesourcery.com>
+
+       * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
+
 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * linux-s390-low.c (s390_collect_ptrace_register)
index 5832dc7ade7a52725c07fa0ed6d4f24aaf16225f..10a1309e3902bd0b2004e1baa4134a60908007e8 100644 (file)
@@ -335,6 +335,7 @@ ppc_arch_setup (void)
 {
 #ifdef __powerpc64__
   long msr;
+  struct regcache *regcache;
 
   /* On a 64-bit host, assume 64-bit inferior process with no
      AltiVec registers.  Reset ppc_hwcap to ensure that the
@@ -344,7 +345,8 @@ ppc_arch_setup (void)
 
   /* Only if the high bit of the MSR is set, we actually have
      a 64-bit inferior.  */
-  collect_register_by_name ("msr", &msr);
+  regcache = get_thread_regcache (current_inferior, 1);
+  collect_register_by_name (regcache, "msr", &msr);
   if (msr < 0)
     {
       ppc_get_hwcap (&ppc_hwcap);