number of io registers reported by remote target is not a multiple of step.
+2003-03-04 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_io_reg_read_command): Fix to handle case when the
+ number of io registers reported by remote target is not a multiple of
+ step.
+
2003-03-04 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_partial_symbol): Add linkage_name argument.
for (i = 0; i < nreg; i += step)
{
- j = step - (nreg % step); /* how many registers this round? */
+ /* how many registers this round? */
+ j = step;
+ if ((i+j) >= nreg)
+ j = nreg - i; /* last block is less than 8 registers */
snprintf (query, sizeof (query) - 1, "avr.io_reg:%x,%x", i, j);
target_query ((int) 'R', query, buf, &bufsiz);