From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: Ulrich Weigand <uweigand@de.ibm.com>,
Kevin Buettner <kevinb@redhat.com>,
Yao Qi <yao@codesourcery.com>
Subject: [PATCH v2 01/13] Rename 'descr' field in regset structure to 'regmap'.
Date: Wed, 25 Jun 2014 16:49:00 -0000 [thread overview]
Message-ID: <1403714949-28133-2-git-send-email-arnez@linux.vnet.ibm.com> (raw)
In-Reply-To: <1403714949-28133-1-git-send-email-arnez@linux.vnet.ibm.com>
The regset structure's 'descr' field is intended to represent some
kind of "register map". Thus, before making more use of it, this
change renames it to 'regmap' and adjusts the comment appropriately.
(See: https://sourceware.org/ml/gdb-patches/2014-05/msg00664.html)
gdb/
* regset.h (struct regset): Rename 'descr' field to 'regmap'.
* ppc-linux-tdep.c (ppc_linux_supply_gregset)
(ppc_linux_collect_gregset ): Likewise.
* rs6000-tdep.c (ppc_supply_gregset, ppc_supply_fpregset)
(ppc_supply_vrregset, ppc_collect_gregset, ppc_collect_fpregset)
(ppc_collect_vrregset): Likewise.
* s390-linux-tdep.c (s390_supply_regset, s390_collect_regset):
Likewise.
---
gdb/ppc-linux-tdep.c | 4 ++--
gdb/regset.h | 7 ++++---
gdb/rs6000-tdep.c | 12 ++++++------
gdb/s390-linux-tdep.c | 4 ++--
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 5410554..f443f55 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -395,7 +395,7 @@ ppc_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const struct ppc_reg_offsets *offsets = regset->descr;
+ const struct ppc_reg_offsets *offsets = regset->regmap;
ppc_supply_gregset (regset, regcache, regnum, gregs, len);
@@ -420,7 +420,7 @@ ppc_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- const struct ppc_reg_offsets *offsets = regset->descr;
+ const struct ppc_reg_offsets *offsets = regset->regmap;
/* Clear areas in the linux gregset not written elsewhere. */
if (regnum == -1)
diff --git a/gdb/regset.h b/gdb/regset.h
index 03dbdaa..37ed99a 100644
--- a/gdb/regset.h
+++ b/gdb/regset.h
@@ -41,9 +41,10 @@ typedef void (collect_regset_ftype) (const struct regset *,
struct regset
{
- /* Data pointer for private use by the methods below, presumably
- providing some sort of description of the register set. */
- const void *descr;
+ /* Pointer to a "register map", for private use by the methods
+ below. Typically describes how the regset's registers are
+ arranged in the buffer collected to or supplied from. */
+ const void *regmap;
/* Function supplying values in a register set to a register cache. */
supply_regset_ftype *supply_regset;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index c4ce51c..85919e4 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -506,7 +506,7 @@ ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const struct ppc_reg_offsets *offsets = regset->descr;
+ const struct ppc_reg_offsets *offsets = regset->regmap;
size_t offset;
int regsize;
@@ -558,7 +558,7 @@ ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->descr;
+ offsets = regset->regmap;
if (regnum == -1)
{
int i;
@@ -626,7 +626,7 @@ ppc_supply_vrregset (const struct regset *regset, struct regcache *regcache,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->descr;
+ offsets = regset->regmap;
if (regnum == -1)
{
int i;
@@ -665,7 +665,7 @@ ppc_collect_gregset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const struct ppc_reg_offsets *offsets = regset->descr;
+ const struct ppc_reg_offsets *offsets = regset->regmap;
size_t offset;
int regsize;
@@ -719,7 +719,7 @@ ppc_collect_fpregset (const struct regset *regset,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->descr;
+ offsets = regset->regmap;
if (regnum == -1)
{
int i;
@@ -792,7 +792,7 @@ ppc_collect_vrregset (const struct regset *regset,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->descr;
+ offsets = regset->regmap;
if (regnum == -1)
{
int i;
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index ea743b5..3658033 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -610,7 +610,7 @@ s390_supply_regset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *regs, size_t len)
{
const short *map;
- for (map = regset->descr; map[0] >= 0; map += 2)
+ for (map = regset->regmap; map[0] >= 0; map += 2)
if (regnum == -1 || regnum == map[1])
regcache_raw_supply (regcache, map[1],
regs ? (const char *)regs + map[0] : NULL);
@@ -643,7 +643,7 @@ s390_collect_regset (const struct regset *regset,
int regnum, void *regs, size_t len)
{
const short *map;
- for (map = regset->descr; map[0] >= 0; map += 2)
+ for (map = regset->regmap; map[0] >= 0; map += 2)
if (regnum == -1 || regnum == map[1])
regcache_raw_collect (regcache, map[1], (char *)regs + map[0]);
}
--
1.8.4.2
next prev parent reply other threads:[~2014-06-25 16:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 16:49 [PATCH v2 00/13] Regset rework preparations part 2 Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 09/13] NIOS2 Linux: Fill 'collect_regset' in regset structure Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 07/13] HPPA Linux: Fill 'collect_regset' in regset structures Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 02/13] regcache: Add functions suitable for regset_supply/collect Andreas Arnez
2014-07-07 9:32 ` Omair Javaid
2014-07-08 11:32 ` Andreas Arnez
2014-07-08 19:09 ` Omair Javaid
2014-07-10 7:54 ` Andreas Arnez
2014-07-19 13:10 ` Omair Javaid
2014-06-25 16:49 ` [PATCH v2 04/13] AARCH64 Linux: Fill 'collect_regset' in regset structures Andreas Arnez
2014-07-07 9:57 ` Omair Javaid
2014-06-25 16:49 ` [PATCH v2 03/13] S390: Migrate to regcache_supply/collect_regset Andreas Arnez
2014-07-15 9:27 ` Ulrich Weigand
2014-07-15 12:07 ` Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 10/13] SCORE: Fill 'collect_regset' in regset structure Andreas Arnez
2014-07-15 10:01 ` Ulrich Weigand
2014-07-15 12:25 ` Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 05/13] ALPHA Linux: Fill 'collect_regset' in regset structures Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 08/13] M32R Linux: Fill 'collect_regset' in regset structure Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 12/13] M68K Linux: Define regset structures Andreas Arnez
2014-07-15 12:13 ` Ulrich Weigand
2014-07-16 18:01 ` Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 11/13] TILEGX Linux: Fill 'collect_regset' in regset structure Andreas Arnez
2014-07-15 10:12 ` Ulrich Weigand
2014-07-16 13:30 ` Andreas Arnez
2014-06-25 16:49 ` Andreas Arnez [this message]
2014-06-25 16:49 ` [PATCH v2 06/13] FRV Linux: Fill 'collect_regset' in regset structures Andreas Arnez
2014-06-25 16:49 ` [PATCH v2 13/13] IA64 Linux: Define " Andreas Arnez
2014-07-15 13:01 ` Ulrich Weigand
2014-07-18 9:06 ` Andreas Arnez
2014-07-01 8:00 ` [ping][PATCH v2 00/13] Regset rework preparations part 2 Andreas Arnez
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=1403714949-28133-2-git-send-email-arnez@linux.vnet.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=uweigand@de.ibm.com \
--cc=yao@codesourcery.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