From patchwork Wed Jun 25 16:48:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 1718 Received: (qmail 28269 invoked by alias); 25 Jun 2014 16:49:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27960 invoked by uid 89); 25 Jun 2014 16:49:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp10.uk.ibm.com Received: from e06smtp10.uk.ibm.com (HELO e06smtp10.uk.ibm.com) (195.75.94.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 25 Jun 2014 16:49:18 +0000 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Jun 2014 17:49:15 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 25 Jun 2014 17:49:12 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9911E17D805F for ; Wed, 25 Jun 2014 17:50:39 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5PGnBlX24707252 for ; Wed, 25 Jun 2014 16:49:11 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5PGnAo5024864 for ; Wed, 25 Jun 2014 10:49:11 -0600 Received: from br87z6lw.boeblingen.de.ibm.com (dyn-9-152-212-196.boeblingen.de.ibm.com [9.152.212.196]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s5PGn9Gq024835; Wed, 25 Jun 2014 10:49:09 -0600 From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Ulrich Weigand , Kevin Buettner , Yao Qi Subject: [PATCH v2 01/13] Rename 'descr' field in regset structure to 'regmap'. Date: Wed, 25 Jun 2014 18:48:57 +0200 Message-Id: <1403714949-28133-2-git-send-email-arnez@linux.vnet.ibm.com> In-Reply-To: <1403714949-28133-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1403714949-28133-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14062516-4966-0000-0000-000000806F3A X-IsSubscribed: yes 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]); }