2003-10-19 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / remote-sim.c
index da4a96ccfd40c4400512807e69a81a99720521af..538f8a4dbc16275583fa32cf088d4f5e5cfc1bf7 100644 (file)
@@ -320,18 +320,18 @@ gdbsim_fetch_register (int regno)
        memset (buf, 0, MAX_REGISTER_SIZE);
        nr_bytes = sim_fetch_register (gdbsim_desc,
                                       REGISTER_SIM_REGNO (regno),
-                                      buf, REGISTER_RAW_SIZE (regno));
-       if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno) && warn_user)
+                                      buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
+       if (nr_bytes > 0 && nr_bytes != DEPRECATED_REGISTER_RAW_SIZE (regno) && warn_user)
          {
            fprintf_unfiltered (gdb_stderr,
                                "Size of register %s (%d/%d) incorrect (%d instead of %d))",
                                REGISTER_NAME (regno),
                                regno, REGISTER_SIM_REGNO (regno),
-                               nr_bytes, REGISTER_RAW_SIZE (regno));
+                               nr_bytes, DEPRECATED_REGISTER_RAW_SIZE (regno));
            warn_user = 0;
          }
        /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
-          indicatingthat GDB and the SIM have different ideas about
+          indicating that GDB and the SIM have different ideas about
           which registers are fetchable.  */
        /* Else if (nr_bytes < 0): an old simulator, that doesn't
           think to return the register size.  Just assume all is ok.  */
@@ -340,7 +340,7 @@ gdbsim_fetch_register (int regno)
          {
            printf_filtered ("gdbsim_fetch_register: %d", regno);
            /* FIXME: We could print something more intelligible.  */
-           dump_mem (buf, REGISTER_RAW_SIZE (regno));
+           dump_mem (buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
          }
        break;
       }
@@ -359,23 +359,23 @@ gdbsim_store_register (int regno)
     }
   else if (REGISTER_SIM_REGNO (regno) >= 0)
     {
-      char *tmp = alloca (max_register_size (current_gdbarch));
+      char tmp[MAX_REGISTER_SIZE];
       int nr_bytes;
       deprecated_read_register_gen (regno, tmp);
       nr_bytes = sim_store_register (gdbsim_desc,
                                     REGISTER_SIM_REGNO (regno),
-                                    tmp, REGISTER_RAW_SIZE (regno));
-      if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno))
+                                    tmp, DEPRECATED_REGISTER_RAW_SIZE (regno));
+      if (nr_bytes > 0 && nr_bytes != DEPRECATED_REGISTER_RAW_SIZE (regno))
        internal_error (__FILE__, __LINE__,
                        "Register size different to expected");
       /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
-        indicatingthat GDB and the SIM have different ideas about
+        indicating that GDB and the SIM have different ideas about
         which registers are fetchable.  */
       if (sr_get_debug ())
        {
          printf_filtered ("gdbsim_store_register: %d", regno);
          /* FIXME: We could print something more intelligible.  */
-         dump_mem (tmp, REGISTER_RAW_SIZE (regno));
+         dump_mem (tmp, DEPRECATED_REGISTER_RAW_SIZE (regno));
        }
     }
 }
This page took 0.028636 seconds and 4 git commands to generate.