* mep-tdep.c (current_me_module): Read from current regcache
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 15 Jun 2007 22:28:52 +0000 (22:28 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 15 Jun 2007 22:28:52 +0000 (22:28 +0000)
instead of calling read_register.
(current_options): Likewise.

gdb/ChangeLog
gdb/mep-tdep.c

index 6860ae9a02d27aa0bda25f8949f03b4aebf9f720..2bd14bf367bd0a8f2ef1c1f3d4b850f74749f534 100644 (file)
@@ -1,3 +1,9 @@
+2007-06-15  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * mep-tdep.c (current_me_module): Read from current regcache
+       instead of calling read_register.
+       (current_options): Likewise.
+
 2007-06-15  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * cris-tdep.c (cris_stopped_data_address): Read register values
index 632172eba9606c720f58ef230a36d476428500ad..0f1ec474fcc25d0db3257f86d575bbeebb8c8aff 100644 (file)
@@ -850,7 +850,12 @@ static CONFIG_ATTR
 current_me_module ()
 {
   if (target_has_registers)
-    return read_register (MEP_MODULE_REGNUM);
+    {
+      ULONGEST regval;
+      regcache_cooked_read_unsigned (current_regcache,
+                                    MEP_MODULE_REGNUM, &regval);
+      return regval;
+    }
   else
     return gdbarch_tdep (current_gdbarch)->me_module;
 }
@@ -868,7 +873,12 @@ static unsigned int
 current_options ()
 {
   if (target_has_registers)
-    return read_register (MEP_OPT_REGNUM);
+    {
+      ULONGEST regval;
+      regcache_cooked_read_unsigned (current_regcache,
+                                    MEP_OPT_REGNUM, &regval);
+      return regval;
+    }
   else
     return me_module_opt (current_me_module ());
 }