* remote.c (remote_prepare_to_store): Replace call to
[deliverable/binutils-gdb.git] / gdb / remote.c
index d5a5cf66c728fb3384692f8b5c0c0146b29498da..3de323ba7fda3fc8bed5105f7f24bd3d61441206 100644 (file)
@@ -3532,16 +3532,19 @@ remote_fetch_registers (int regnum)
 static void
 remote_prepare_to_store (void)
 {
+  struct remote_state *rs = get_remote_state ();
+  int i;
+  char buf[MAX_REGISTER_SIZE];
+
   /* Make sure the entire registers array is valid.  */
   switch (remote_protocol_P.support)
     {
     case PACKET_DISABLE:
     case PACKET_SUPPORT_UNKNOWN:
-      /* NOTE: This isn't rs->sizeof_g_packet because here, we are
-         forcing the register cache to read its and not the target
-         registers.  */
-      deprecated_read_register_bytes (0, (char *) NULL,
-                                     DEPRECATED_REGISTER_BYTES); /* OK */
+      /* Make sure all the necessary registers are cached.  */
+      for (i = 0; i < NUM_REGS; i++)
+       if (rs->regs[i].in_g_packet)
+         regcache_raw_read (current_regcache, rs->regs[i].regnum, buf);
       break;
     case PACKET_ENABLE:
       break;
This page took 0.025925 seconds and 4 git commands to generate.