Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Theodore A. Roth" <troth@openavr.org>
To: gdb-patches@sources.redhat.com
Subject: [commit] avr: fix io reg read command.
Date: Wed, 05 Mar 2003 00:25:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.53.0303041622190.486@knuth.amplepower.com> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 345 bytes --]

I've committed this patch.

Is there going to be another gdb-5.3.x release? If so, I'd like to
commit this to the branch.

Ted Roth

2003-03-04  Theodore A. Roth  <troth@openavr.org>

    * gdb/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.


[-- Attachment #2: Type: TEXT/PLAIN, Size: 933 bytes --]

2003-03-04  Theodore A. Roth  <troth@openavr.org>

	* gdb/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.

Index: gdb/avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.25
diff -u -r1.25 avr-tdep.c
--- gdb/avr-tdep.c	27 Feb 2003 17:48:46 -0000	1.25
+++ gdb/avr-tdep.c	4 Mar 2003 20:48:51 -0000
@@ -1278,7 +1278,10 @@
 
   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);

             reply	other threads:[~2003-03-05  0:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-05  0:25 Theodore A. Roth [this message]
2003-03-05  3:07 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0303041622190.486@knuth.amplepower.com \
    --to=troth@openavr.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox