* remote.c (init_remote_state): Eliminate use of
authorKevin Buettner <kevinb@redhat.com>
Thu, 28 Apr 2005 18:15:16 +0000 (18:15 +0000)
committerKevin Buettner <kevinb@redhat.com>
Thu, 28 Apr 2005 18:15:16 +0000 (18:15 +0000)
deprecated_register_bytes().

gdb/ChangeLog
gdb/remote.c

index bafa202b190d004f4a31ba1ab38b73e31abb77d5..8b189cb448998bab1281bb690ebd3d67d478c623 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-28  Kevin Buettner  <kevinb@redhat.com>
+
+       * remote.c (init_remote_state): Eliminate use of
+       deprecated_register_bytes().
+
 2005-04-28  Andrew Cagney  <cagney@gnu.org>
 
        * valops.c (check_field): Make buffer a bfd_byte.
index 450ef5b91baefa011a616290a2aaaab93f1ae609..e7d76dae12c8dcb9193b9eb43e1a7b1e05de886b 100644 (file)
@@ -248,10 +248,7 @@ init_remote_state (struct gdbarch *gdbarch)
   int regnum;
   struct remote_state *rs = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct remote_state);
 
-  if (deprecated_register_bytes () != 0)
-    rs->sizeof_g_packet = deprecated_register_bytes ();
-  else
-    rs->sizeof_g_packet = 0;
+  rs->sizeof_g_packet = 0;
 
   /* Assume a 1:1 regnum<->pnum table.  */
   rs->regs = GDBARCH_OBSTACK_CALLOC (gdbarch, NUM_REGS + NUM_PSEUDO_REGS,
@@ -266,8 +263,8 @@ init_remote_state (struct gdbarch *gdbarch)
       /* ...name = REGISTER_NAME (regnum); */
 
       /* Compute packet size by accumulating the size of all registers.  */
-      if (deprecated_register_bytes () == 0)
-        rs->sizeof_g_packet += register_size (current_gdbarch, regnum);
+      if (regnum < NUM_REGS)
+       rs->sizeof_g_packet += register_size (current_gdbarch, regnum);
     }
 
   /* Default maximum number of characters in a packet body. Many