* linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 14 Jun 2010 13:53:04 +0000 (13:53 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 14 Jun 2010 13:53:04 +0000 (13:53 +0000)
* linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.

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

index 665556c4df3601741c66e9e5e47b27fdb1e6bbbb..a43e0ea84d3a067b6ede409a3d7a7787b0fcfb63 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
+       * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
+
 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
            Stan Shebs  <stan@codesourcery.com>
 
index 000b20fbf1d06a34deb6fb0597f7a010e99fa7b1..48cf7c0917b27546f0db407e057acb209cdacaff 100644 (file)
@@ -345,8 +345,10 @@ ppc_arch_setup (void)
 
   /* Only if the high bit of the MSR is set, we actually have
      a 64-bit inferior.  */
-  regcache = get_thread_regcache (current_inferior, 1);
+  regcache = new_register_cache ();
+  fetch_inferior_registers (regcache, find_regno ("msr"));
   collect_register_by_name (regcache, "msr", &msr);
+  free_register_cache (regcache);
   if (msr < 0)
     {
       ppc_get_hwcap (&ppc_hwcap);
index eb865dc35cca77495bad5c0d49d8493a361d1077..943d8c5dea033c12b756329751734f202ec08c48 100644 (file)
@@ -270,8 +270,11 @@ s390_arch_setup (void)
 #ifdef __s390x__
   {
     unsigned int pswm;
-    struct regcache *regcache = get_thread_regcache (current_inferior, 1);
+    struct regcache *regcache = new_register_cache ();
+    fetch_inferior_registers (regcache, find_regno ("pswm"));
     collect_register_by_name (regcache, "pswm", &pswm);
+    free_register_cache (regcache);
+
     if (pswm & 1)
       init_registers_s390x_linux64 ();
 
This page took 0.031736 seconds and 4 git commands to generate.