2003-06-03 Theodore A. Roth * remote.c (init_remote_state): Compute sizeof_g_packet by accumulation of the size of all registers instead of using DEPRECATED_REGISTER_BYTES. Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.100 diff -u -p -r1.100 remote.c --- remote.c 17 May 2003 05:59:58 -0000 1.100 +++ remote.c 3 Jun 2003 21:36:30 -0000 @@ -261,9 +261,7 @@ init_remote_state (struct gdbarch *gdbar int regnum; struct remote_state *rs = xmalloc (sizeof (struct remote_state)); - /* Start out by having the remote protocol mimic the existing - behavour - just copy in the description of the register cache. */ - rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES; /* OK */ + rs->sizeof_g_packet = 0; /* Assume a 1:1 regnum<->pnum table. */ rs->regs = xcalloc (NUM_REGS + NUM_PSEUDO_REGS, sizeof (struct packet_reg)); @@ -274,8 +272,10 @@ init_remote_state (struct gdbarch *gdbar r->regnum = regnum; r->offset = REGISTER_BYTE (regnum); r->in_g_packet = (regnum < NUM_REGS); - /* ...size = REGISTER_RAW_SIZE (regnum); */ /* ...name = REGISTER_NAME (regnum); */ + + /* Compute packet size by accumulating the size of all registers. */ + rs->sizeof_g_packet += REGISTER_RAW_SIZE (regnum); } /* Default maximum number of characters in a packet body. Many