From: Andreas Arnez Date: Tue, 3 Jun 2014 17:11:35 +0000 (+0200) Subject: Rename 'descr' field in regset structure to 'regmap'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7fefa8d7d6359ec905dbc59bb4e616f386ea2e3d;p=binutils-gdb.git Rename 'descr' field in regset structure to 'regmap'. 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) --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 93bfc721b90..d775f941171 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2014-08-07 Andreas Arnez + + * 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. + 2014-08-07 Yao Qi * corelow.c (core_xfer_partial): Replace 0 with TARGET_XFER_EOF. diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 6e467657acc..316b2540931 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 03dbdaac692..37ed99a3b68 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 41f80d57803..730afe7eaf1 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -505,7 +505,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; @@ -557,7 +557,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; @@ -625,7 +625,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; @@ -664,7 +664,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; @@ -718,7 +718,7 @@ ppc_collect_fpregset (const struct regset *regset, return; tdep = gdbarch_tdep (gdbarch); - offsets = regset->descr; + offsets = regset->regmap; if (regnum == -1) { int i; @@ -791,7 +791,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 d10e47a03ff..d1f474962c8 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -609,7 +609,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); @@ -642,7 +642,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]); }