* README-vms: Delete.
[deliverable/binutils-gdb.git] / gdb / i386gnu-nat.c
index 375f0eb9c23bcf4e7e7d086215ec47c31e47bbc6..195d985f9f299e48724545b24f36ee9734e61775 100644 (file)
@@ -28,6 +28,7 @@
 #include "gdb_assert.h"
 #include <errno.h>
 #include <stdio.h>
+#include "gdb_string.h"
 
 #include <mach.h>
 #include <mach_error.h>
@@ -60,8 +61,9 @@ static int reg_offset[] =
 #define REG_ADDR(state, regnum) ((char *)(state) + reg_offset[regnum])
 
 \f
-/* Get the whole floating-point state of THREAD and record the
-   values of the corresponding (pseudo) registers.  */
+/* Get the whole floating-point state of THREAD and record the values
+   of the corresponding (pseudo) registers.  */
+
 static void
 fetch_fpregs (struct proc *thread)
 {
@@ -73,24 +75,21 @@ fetch_fpregs (struct proc *thread)
                          (thread_state_t) &state, &count);
   if (err)
     {
-      warning ("Couldn't fetch floating-point state from %s",
+      warning (_("Couldn't fetch floating-point state from %s"),
               proc_string (thread));
       return;
     }
 
   if (!state.initialized)
-    /* The floating-point state isn't initialized.  */
     {
-      int i;
-
-      for (i = FP0_REGNUM; i <= FOP_REGNUM; i++)
-       regcache_raw_supply (current_regcache, i, NULL);
-
-      return;
+      /* The floating-point state isn't initialized.  */
+      i387_supply_fsave (current_regcache, -1, NULL);
+    }
+  else
+    {
+      /* Supply the floating-point registers.  */
+      i387_supply_fsave (current_regcache, -1, state.hw_state);
     }
-
-  /* Supply the floating-point registers.  */
-  i387_supply_fsave (current_regcache, -1, state.hw_state);
 }
 
 #ifdef HAVE_SYS_PROCFS_H
@@ -122,7 +121,7 @@ gnu_fetch_registers (int regno)
 
   thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid));
   if (!thread)
-    error ("Can't fetch registers from thread %d: No such thread",
+    error (_("Can't fetch registers from thread %d: No such thread"),
           PIDGET (inferior_ptid));
 
   if (regno < I386_NUM_GREGS || regno == -1)
@@ -133,7 +132,7 @@ gnu_fetch_registers (int regno)
       state = proc_get_state (thread, 0);
       if (!state)
        {
-         warning ("Couldn't fetch registers from %s",
+         warning (_("Couldn't fetch registers from %s"),
                   proc_string (thread));
          return;
        }
@@ -180,7 +179,7 @@ store_fpregs (struct proc *thread, int regno)
                          (thread_state_t) &state, &count);
   if (err)
     {
-      warning ("Couldn't fetch floating-point state from %s",
+      warning (_("Couldn't fetch floating-point state from %s"),
               proc_string (thread));
       return;
     }
@@ -193,7 +192,7 @@ store_fpregs (struct proc *thread, int regno)
                          (thread_state_t) &state, i386_FLOAT_STATE_COUNT);
   if (err)
     {
-      warning ("Couldn't store floating-point state into %s",
+      warning (_("Couldn't store floating-point state into %s"),
               proc_string (thread));
       return;
     }
@@ -211,7 +210,7 @@ gnu_store_registers (int regno)
 
   thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid));
   if (!thread)
-    error ("Couldn't store registers into thread %d: No such thread",
+    error (_("Couldn't store registers into thread %d: No such thread"),
           PIDGET (inferior_ptid));
 
   if (regno < I386_NUM_GREGS || regno == -1)
@@ -228,7 +227,7 @@ gnu_store_registers (int regno)
       state = proc_get_state (thread, 1);
       if (!state)
        {
-         warning ("Couldn't store registers into %s", proc_string (thread));
+         warning (_("Couldn't store registers into %s"), proc_string (thread));
          return;
        }
 
@@ -248,14 +247,14 @@ gnu_store_registers (int regno)
                           register_size (current_gdbarch, check_regno)))
              /* Register CHECK_REGNO has changed!  Ack!  */
              {
-               warning ("Register %s changed after the thread was aborted",
+               warning (_("Register %s changed after the thread was aborted"),
                         REGISTER_NAME (check_regno));
                if (regno >= 0 && regno != check_regno)
                  /* Update GDB's copy of the register.  */
                  regcache_raw_supply (regcache, check_regno,
                                       REG_ADDR (state, check_regno));
                else
-                 warning ("... also writing this register!  Suspicious...");
+                 warning (_("... also writing this register!  Suspicious..."));
              }
        }
 
@@ -274,7 +273,7 @@ gnu_store_registers (int regno)
          proc_debug (thread, "storing register %s", REGISTER_NAME (regno));
 
          gdb_assert (regcache_valid_p (regcache, regno));
-         regcache_craw_collect (regcache, regno, REG_ADDR (state, regno));
+         regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));
        }
 
       /* Restore the T bit.  */
This page took 0.025941 seconds and 4 git commands to generate.