Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alan Hayward <alan.hayward@arm.com>
To: gdb-patches@sourceware.org
Cc: nd@arm.com,	Alan Hayward <alan.hayward@arm.com>
Subject: [PATCH v2 1/3] Use unsigned ints in regcache_map_entry
Date: Thu, 21 Jun 2018 09:38:00 -0000	[thread overview]
Message-ID: <20180621093802.79342-2-alan.hayward@arm.com> (raw)
In-Reply-To: <20180621093802.79342-1-alan.hayward@arm.com>

All current uses of regcache_map_entry use static hard coded values.
Update transfer_regset which uses those values.

2018-06-21  Alan Hayward  <alan.hayward@arm.com>

	* regcache.c (transfer_regset): Use unsigned ints.
	* regcache.h (regcache_map_entry): Likewise.
---
 gdb/regcache.c | 4 ++--
 gdb/regcache.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/regcache.c b/gdb/regcache.c
index 25436bb456..6276b149a2 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -988,14 +988,14 @@ regcache::transfer_regset (const struct regset *regset,
 			   void *out_buf, size_t size) const
 {
   const struct regcache_map_entry *map;
-  int offs = 0, count;
+  unsigned int offs = 0, count;
 
   for (map = (const struct regcache_map_entry *) regset->regmap;
        (count = map->count) != 0;
        map++)
     {
       int regno = map->regno;
-      int slot_size = map->size;
+      unsigned int slot_size = map->size;
 
       if (slot_size == 0 && regno != REGCACHE_MAP_SKIP)
 	slot_size = m_descr->sizeof_register[regno];
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 74ac8583bc..35c41888a7 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -83,9 +83,9 @@ extern void regcache_write_pc (struct regcache *regcache, CORE_ADDR pc);
 
 struct regcache_map_entry
 {
-  int count;
+  unsigned int count;
   int regno;
-  int size;
+  unsigned int size;
 };
 
 /* Special value for the 'regno' field in the struct above.  */
-- 
2.15.2 (Apple Git-101.1)


  reply	other threads:[~2018-06-21  9:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  9:39 [PATCH v2 0/3] Support large registers in regcache transfer_regset Alan Hayward
2018-06-21  9:38 ` Alan Hayward [this message]
2018-06-21 13:27   ` [PATCH v2 1/3] Use unsigned ints in regcache_map_entry Simon Marchi
2018-06-21 13:52     ` Simon Marchi
2018-06-21 15:19       ` Alan Hayward
     [not found]         ` <3e13b55d-5283-eb61-c018-880ff0e92ab1@ericsson.com>
2018-06-21 17:32           ` Simon Marchi
2018-06-21 19:52             ` Alan Hayward
2018-06-21  9:39 ` [PATCH v2 2/3] Avoid memcpys in regcache read_part/write_part for full registers Alan Hayward
2018-06-21 14:00   ` Simon Marchi
2018-06-21  9:39 ` [PATCH v2 3/3] Use partial register read/writes in transfer_regset Alan Hayward
2018-06-21 14:16   ` Simon Marchi
2018-06-21 19:56     ` Alan Hayward
2018-06-21 15:02   ` Simon Marchi

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=20180621093802.79342-2-alan.hayward@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.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