[RFC,09/23] SPARC: Rename register maps from "*regset" to "*regmap"

Message ID 878uqp4wa6.fsf@br87z6lw.de.ibm.com
State Committed
Headers

Commit Message

Andreas Arnez April 28, 2014, 9:51 a.m. UTC
  As a preparation for the next patch in this series, this patch clears
the naming confusion about "regset" versus "sparc*regset".  The latter
was used to represent the *map* of a register set, not the register
set itself, and is thus renamed accordingly.

The following identifiers are renamed:

  sparc32_bsd_fpregset => sparc32_bsd_fpregmap
  sparc32_linux_core_gregset => sparc32_linux_core_gregmap
  sparc32_sol2_fpregset => sparc32_sol2_fpregmap
  sparc32_sol2_gregset => sparc32_sol2_gregmap
  sparc32_sunos4_fpregset => sparc32_sunos4_fpregmap
  sparc32_sunos4_gregset => sparc32_sunos4_gregmap
  sparc32nbsd_gregset => sparc32nbsd_gregmap
  sparc64_bsd_fpregset => sparc64_bsd_fpregmap
  sparc64_linux_core_gregset => sparc64_linux_core_gregmap
  sparc64_linux_ptrace_gregset => sparc64_linux_ptrace_gregmap
  sparc64_sol2_fpregset => sparc64_sol2_fpregmap
  sparc64_sol2_gregset => sparc64_sol2_gregmap
  sparc64fbsd_gregset => sparc64fbsd_gregmap
  sparc64nbsd_gregset => sparc64nbsd_gregmap
  sparc64obsd_core_gregset => sparc64obsd_core_gregmap
  sparc64obsd_gregset => sparc64obsd_gregmap
  sparc_fpregset => sparc_fpregmap
  sparc_gregset => sparc_gregmap
  sparc_sol2_fpregset => sparc_sol2_fpregmap
  sparc_sol2_gregset => sparc_sol2_gregmap

Also, all local variables 'gregset' and 'fpregset' are renamed to
'gregmap' and 'fpregmap', respectively.

The patch was generated with the following Perl script:

#!/usr/bin/perl

my %renamed;

sub rename_maybe($)
{
    my ($w) = @_;
    return $w if $w =~ /_(?:supply|collect)_/;
    unless (defined $renamed{$w}) {
    ($renamed{$w} = $w) =~ s/regset$/regmap/;
    }
    return $renamed{$w};
}

while (my $file = shift) {
    rename $file, "$file~";
    open my $in, '<', "$file~";
    open my $out, '>', $file;

    while (<$in>) {
    s/\b(sparc\w*regset)\b/rename_maybe($1)/eg;
    s/(regmap\s+\*)(g|fp)regset/$1$2regmap/g;
    s/([* ([])\b(g|fp)regset\b/$1$2regmap/g
	if $file =~ /\.c$/;
    print $out $_;
    }
    close $out;
    close $in;
}

open my $log, '>', "sparc-rename.log";

for my $word (sort {$a cmp $b} keys %renamed) {
    print $log "$word => " . $renamed{$word} . "\n";
}
---
 gdb/sparc-linux-nat.c    | 10 +++---
 gdb/sparc-linux-tdep.c   | 10 +++---
 gdb/sparc-nat.c          | 28 ++++++++---------
 gdb/sparc-nat.h          | 16 +++++-----
 gdb/sparc-sol2-nat.c     | 16 +++++-----
 gdb/sparc-sol2-tdep.c    |  4 +--
 gdb/sparc-tdep.c         | 50 ++++++++++++++---------------
 gdb/sparc-tdep.h         | 24 +++++++-------
 gdb/sparc64-linux-nat.c  | 14 ++++-----
 gdb/sparc64-linux-tdep.c | 10 +++---
 gdb/sparc64-sol2-tdep.c  |  4 +--
 gdb/sparc64-tdep.c       | 82 ++++++++++++++++++++++++------------------------
 gdb/sparc64-tdep.h       | 20 ++++++------
 gdb/sparc64fbsd-nat.c    |  2 +-
 gdb/sparc64fbsd-tdep.c   | 10 +++---
 gdb/sparc64nbsd-nat.c    | 24 +++++++-------
 gdb/sparc64nbsd-tdep.c   |  6 ++--
 gdb/sparc64obsd-nat.c    |  4 +--
 gdb/sparc64obsd-tdep.c   | 12 +++----
 gdb/sparcnbsd-nat.c      |  4 +--
 gdb/sparcnbsd-tdep.c     |  8 ++---
 21 files changed, 179 insertions(+), 179 deletions(-)
  

Comments

Mark Kettenis May 5, 2014, 9:50 a.m. UTC | #1
> From: Andreas Arnez <arnez@linux.vnet.ibm.com>
> Date: Mon, 28 Apr 2014 11:51:13 +0200
> 
> As a preparation for the next patch in this series, this patch clears
> the naming confusion about "regset" versus "sparc*regset".  The latter
> was used to represent the *map* of a register set, not the register
> set itself, and is thus renamed accordingly.
> 
> The following identifiers are renamed:
> 
>   sparc32_bsd_fpregset => sparc32_bsd_fpregmap
>   sparc32_linux_core_gregset => sparc32_linux_core_gregmap
>   sparc32_sol2_fpregset => sparc32_sol2_fpregmap
>   sparc32_sol2_gregset => sparc32_sol2_gregmap
>   sparc32_sunos4_fpregset => sparc32_sunos4_fpregmap
>   sparc32_sunos4_gregset => sparc32_sunos4_gregmap
>   sparc32nbsd_gregset => sparc32nbsd_gregmap
>   sparc64_bsd_fpregset => sparc64_bsd_fpregmap
>   sparc64_linux_core_gregset => sparc64_linux_core_gregmap
>   sparc64_linux_ptrace_gregset => sparc64_linux_ptrace_gregmap
>   sparc64_sol2_fpregset => sparc64_sol2_fpregmap
>   sparc64_sol2_gregset => sparc64_sol2_gregmap
>   sparc64fbsd_gregset => sparc64fbsd_gregmap
>   sparc64nbsd_gregset => sparc64nbsd_gregmap
>   sparc64obsd_core_gregset => sparc64obsd_core_gregmap
>   sparc64obsd_gregset => sparc64obsd_gregmap
>   sparc_fpregset => sparc_fpregmap
>   sparc_gregset => sparc_gregmap
>   sparc_sol2_fpregset => sparc_sol2_fpregmap
>   sparc_sol2_gregset => sparc_sol2_gregmap

Sounds reasonable to me; didn't spot any problems.
  

Patch

diff --git a/gdb/sparc-linux-nat.c b/gdb/sparc-linux-nat.c
index a01c3b3..0e2fa85 100644
--- a/gdb/sparc-linux-nat.c
+++ b/gdb/sparc-linux-nat.c
@@ -31,26 +31,26 @@ 
 void
 supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
 {
-  sparc32_supply_gregset (sparc_gregset, regcache, -1, gregs);
+  sparc32_supply_gregset (sparc_gregmap, regcache, -1, gregs);
 }
 
 void
 supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
 {
-  sparc32_supply_fpregset (sparc_fpregset, regcache, -1, fpregs);
+  sparc32_supply_fpregset (sparc_fpregmap, regcache, -1, fpregs);
 }
 
 void
 fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
 {
-  sparc32_collect_gregset (sparc_gregset, regcache, regnum, gregs);
+  sparc32_collect_gregset (sparc_gregmap, regcache, regnum, gregs);
 }
 
 void
 fill_fpregset (const struct regcache *regcache,
 	       prfpregset_t *fpregs, int regnum)
 {
-  sparc32_collect_fpregset (sparc_fpregset, regcache, regnum, fpregs);
+  sparc32_collect_fpregset (sparc_fpregmap, regcache, regnum, fpregs);
 }
 
 void _initialize_sparc_linux_nat (void);
@@ -63,7 +63,7 @@  _initialize_sparc_linux_nat (void)
   /* Fill in the generic GNU/Linux methods.  */
   t = linux_target ();
 
-  sparc_fpregset = &sparc32_bsd_fpregset;
+  sparc_fpregmap = &sparc32_bsd_fpregmap;
 
   /* Add our register access methods.  */
   t->to_fetch_registers = sparc_fetch_inferior_registers;
diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c
index 713169a..4a193e2 100644
--- a/gdb/sparc-linux-tdep.c
+++ b/gdb/sparc-linux-tdep.c
@@ -198,7 +198,7 @@  sparc32_linux_step_trap (struct frame_info *frame, unsigned long insn)
 }
 
 
-const struct sparc_gregset sparc32_linux_core_gregset =
+const struct sparc_gregmap sparc32_linux_core_gregmap =
 {
   32 * 4,			/* %psr */
   33 * 4,			/* %pc */
@@ -217,7 +217,7 @@  sparc32_linux_supply_core_gregset (const struct regset *regset,
 				   struct regcache *regcache,
 				   int regnum, const void *gregs, size_t len)
 {
-  sparc32_supply_gregset (&sparc32_linux_core_gregset,
+  sparc32_supply_gregset (&sparc32_linux_core_gregmap,
 			  regcache, regnum, gregs);
 }
 
@@ -226,7 +226,7 @@  sparc32_linux_collect_core_gregset (const struct regset *regset,
 				    const struct regcache *regcache,
 				    int regnum, void *gregs, size_t len)
 {
-  sparc32_collect_gregset (&sparc32_linux_core_gregset,
+  sparc32_collect_gregset (&sparc32_linux_core_gregmap,
 			   regcache, regnum, gregs);
 }
 
@@ -235,7 +235,7 @@  sparc32_linux_supply_core_fpregset (const struct regset *regset,
 				    struct regcache *regcache,
 				    int regnum, const void *fpregs, size_t len)
 {
-  sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
+  sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 static void
@@ -243,7 +243,7 @@  sparc32_linux_collect_core_fpregset (const struct regset *regset,
 				     const struct regcache *regcache,
 				     int regnum, void *fpregs, size_t len)
 {
-  sparc32_collect_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
+  sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 /* Set the program counter for process PTID to PC.  */
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 77054d1..22e1e5f 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -81,15 +81,15 @@  typedef struct fp_status fpregset_t;
 #endif
 
 /* Register set description.  */
-const struct sparc_gregset *sparc_gregset;
-const struct sparc_fpregset *sparc_fpregset;
-void (*sparc_supply_gregset) (const struct sparc_gregset *,
+const struct sparc_gregmap *sparc_gregmap;
+const struct sparc_fpregmap *sparc_fpregmap;
+void (*sparc_supply_gregset) (const struct sparc_gregmap *,
 			      struct regcache *, int , const void *);
-void (*sparc_collect_gregset) (const struct sparc_gregset *,
+void (*sparc_collect_gregset) (const struct sparc_gregmap *,
 			       const struct regcache *, int, void *);
-void (*sparc_supply_fpregset) (const struct sparc_fpregset *,
+void (*sparc_supply_fpregset) (const struct sparc_fpregmap *,
 			       struct regcache *, int , const void *);
-void (*sparc_collect_fpregset) (const struct sparc_fpregset *,
+void (*sparc_collect_fpregset) (const struct sparc_fpregmap *,
 				const struct regcache *, int , void *);
 int (*sparc_gregset_supplies_p) (struct gdbarch *, int);
 int (*sparc_fpregset_supplies_p) (struct gdbarch *, int);
@@ -174,7 +174,7 @@  sparc_fetch_inferior_registers (struct target_ops *ops,
       if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
 	perror_with_name (_("Couldn't get registers"));
 
-      sparc_supply_gregset (sparc_gregset, regcache, -1, &regs);
+      sparc_supply_gregset (sparc_gregmap, regcache, -1, &regs);
       if (regnum != -1)
 	return;
     }
@@ -186,7 +186,7 @@  sparc_fetch_inferior_registers (struct target_ops *ops,
       if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
 	perror_with_name (_("Couldn't get floating point status"));
 
-      sparc_supply_fpregset (sparc_fpregset, regcache, -1, &fpregs);
+      sparc_supply_fpregset (sparc_fpregmap, regcache, -1, &fpregs);
     }
 }
 
@@ -210,7 +210,7 @@  sparc_store_inferior_registers (struct target_ops *ops,
       if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
 	perror_with_name (_("Couldn't get registers"));
 
-      sparc_collect_gregset (sparc_gregset, regcache, regnum, &regs);
+      sparc_collect_gregset (sparc_gregmap, regcache, regnum, &regs);
 
       if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
 	perror_with_name (_("Couldn't write registers"));
@@ -237,7 +237,7 @@  sparc_store_inferior_registers (struct target_ops *ops,
 	perror_with_name (_("Couldn't get floating-point registers"));
 
       memcpy (&saved_fpregs, &fpregs, sizeof (fpregs));
-      sparc_collect_fpregset (sparc_fpregset, regcache, regnum, &fpregs);
+      sparc_collect_fpregset (sparc_fpregmap, regcache, regnum, &fpregs);
 
       /* Writing the floating-point registers will fail on NetBSD with
 	 EINVAL if the inferior process doesn't have an FPU state
@@ -352,10 +352,10 @@  void
 _initialize_sparc_nat (void)
 {
   /* Deafult to using SunOS 4 register sets.  */
-  if (sparc_gregset == NULL)
-    sparc_gregset = &sparc32_sunos4_gregset;
-  if (sparc_fpregset == NULL)
-    sparc_fpregset = &sparc32_sunos4_fpregset;
+  if (sparc_gregmap == NULL)
+    sparc_gregmap = &sparc32_sunos4_gregmap;
+  if (sparc_fpregmap == NULL)
+    sparc_fpregmap = &sparc32_sunos4_fpregmap;
   if (sparc_supply_gregset == NULL)
     sparc_supply_gregset = sparc32_supply_gregset;
   if (sparc_collect_gregset == NULL)
diff --git a/gdb/sparc-nat.h b/gdb/sparc-nat.h
index f40e4bd..d1283af 100644
--- a/gdb/sparc-nat.h
+++ b/gdb/sparc-nat.h
@@ -20,18 +20,18 @@ 
 #ifndef SPARC_NAT_H
 #define SPARC_NAT_H 1
 
-struct sparc_gregset;
-struct sparc_fpregset;
+struct sparc_gregmap;
+struct sparc_fpregmap;
 
-extern const struct sparc_gregset *sparc_gregset;
-extern const struct sparc_fpregset *sparc_fpregset;
-extern void (*sparc_supply_gregset) (const struct sparc_gregset *,
+extern const struct sparc_gregmap *sparc_gregmap;
+extern const struct sparc_fpregmap *sparc_fpregmap;
+extern void (*sparc_supply_gregset) (const struct sparc_gregmap *,
 				     struct regcache *, int , const void *);
-extern void (*sparc_collect_gregset) (const struct sparc_gregset *,
+extern void (*sparc_collect_gregset) (const struct sparc_gregmap *,
 				      const struct regcache *, int, void *);
-extern void (*sparc_supply_fpregset) (const struct sparc_fpregset *,
+extern void (*sparc_supply_fpregset) (const struct sparc_fpregmap *,
 				      struct regcache *, int , const void *);
-extern void (*sparc_collect_fpregset) (const struct sparc_fpregset *,
+extern void (*sparc_collect_fpregset) (const struct sparc_fpregmap *,
 				       const struct regcache *, int , void *);
 extern int (*sparc_gregset_supplies_p) (struct gdbarch *gdbarch, int);
 extern int (*sparc_fpregset_supplies_p) (struct gdbarch *gdbarch, int);
diff --git a/gdb/sparc-sol2-nat.c b/gdb/sparc-sol2-nat.c
index 925f786..825f4b5 100644
--- a/gdb/sparc-sol2-nat.c
+++ b/gdb/sparc-sol2-nat.c
@@ -58,8 +58,8 @@ 
 #define sparc_collect_gregset sparc64_collect_gregset
 #define sparc_collect_fpregset sparc64_collect_fpregset
 
-#define sparc_sol2_gregset sparc64_sol2_gregset
-#define sparc_sol2_fpregset sparc64_sol2_fpregset
+#define sparc_sol2_gregmap sparc64_sol2_gregmap
+#define sparc_sol2_fpregmap sparc64_sol2_fpregmap
 
 #else
 
@@ -68,34 +68,34 @@ 
 #define sparc_collect_gregset sparc32_collect_gregset
 #define sparc_collect_fpregset sparc32_collect_fpregset
 
-#define sparc_sol2_gregset sparc32_sol2_gregset
-#define sparc_sol2_fpregset sparc32_sol2_fpregset
+#define sparc_sol2_gregmap sparc32_sol2_gregmap
+#define sparc_sol2_fpregmap sparc32_sol2_fpregmap
 
 #endif
 
 void
 supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
 {
-  sparc_supply_gregset (&sparc_sol2_gregset, regcache, -1, gregs);
+  sparc_supply_gregset (&sparc_sol2_gregmap, regcache, -1, gregs);
 }
 
 void
 supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
 {
-  sparc_supply_fpregset (&sparc_sol2_fpregset, regcache, -1, fpregs);
+  sparc_supply_fpregset (&sparc_sol2_fpregmap, regcache, -1, fpregs);
 }
 
 void
 fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
 {
-  sparc_collect_gregset (&sparc_sol2_gregset, regcache, regnum, gregs);
+  sparc_collect_gregset (&sparc_sol2_gregmap, regcache, regnum, gregs);
 }
 
 void
 fill_fpregset (const struct regcache *regcache,
 	       prfpregset_t *fpregs, int regnum)
 {
-  sparc_collect_fpregset (&sparc_sol2_fpregset, regcache, regnum, fpregs);
+  sparc_collect_fpregset (&sparc_sol2_fpregmap, regcache, regnum, fpregs);
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index 381adf9..4452c00 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -36,7 +36,7 @@ 
 #include "solib-svr4.h"
 
 /* From <sys/regset.h>.  */
-const struct sparc_gregset sparc32_sol2_gregset =
+const struct sparc_gregmap sparc32_sol2_gregmap =
 {
   32 * 4,			/* %psr */
   33 * 4,			/* %pc */
@@ -48,7 +48,7 @@  const struct sparc_gregset sparc32_sol2_gregset =
   16 * 4,			/* %l0 */
 };
 
-const struct sparc_fpregset sparc32_sol2_fpregset =
+const struct sparc_fpregmap sparc32_sol2_fpregmap =
 {
   0 * 4,			/* %f0 */
   33 * 4,			/* %fsr */
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 311a156..e7b3090 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1898,7 +1898,7 @@  sparc_collect_rwindow (const struct regcache *regcache,
 /* Helper functions for dealing with register sets.  */
 
 void
-sparc32_supply_gregset (const struct sparc_gregset *gregset,
+sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
 			struct regcache *regcache,
 			int regnum, const void *gregs)
 {
@@ -1908,26 +1908,26 @@  sparc32_supply_gregset (const struct sparc_gregset *gregset,
 
   if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
     regcache_raw_supply (regcache, SPARC32_PSR_REGNUM,
-			 regs + gregset->r_psr_offset);
+			 regs + gregmap->r_psr_offset);
 
   if (regnum == SPARC32_PC_REGNUM || regnum == -1)
     regcache_raw_supply (regcache, SPARC32_PC_REGNUM,
-			 regs + gregset->r_pc_offset);
+			 regs + gregmap->r_pc_offset);
 
   if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
     regcache_raw_supply (regcache, SPARC32_NPC_REGNUM,
-			 regs + gregset->r_npc_offset);
+			 regs + gregmap->r_npc_offset);
 
   if (regnum == SPARC32_Y_REGNUM || regnum == -1)
     regcache_raw_supply (regcache, SPARC32_Y_REGNUM,
-			 regs + gregset->r_y_offset);
+			 regs + gregmap->r_y_offset);
 
   if (regnum == SPARC_G0_REGNUM || regnum == -1)
     regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero);
 
   if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
     {
-      int offset = gregset->r_g1_offset;
+      int offset = gregmap->r_g1_offset;
 
       for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
 	{
@@ -1941,7 +1941,7 @@  sparc32_supply_gregset (const struct sparc_gregset *gregset,
     {
       /* Not all of the register set variants include Locals and
          Inputs.  For those that don't, we read them off the stack.  */
-      if (gregset->r_l0_offset == -1)
+      if (gregmap->r_l0_offset == -1)
 	{
 	  ULONGEST sp;
 
@@ -1950,7 +1950,7 @@  sparc32_supply_gregset (const struct sparc_gregset *gregset,
 	}
       else
 	{
-	  int offset = gregset->r_l0_offset;
+	  int offset = gregmap->r_l0_offset;
 
 	  for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
 	    {
@@ -1963,7 +1963,7 @@  sparc32_supply_gregset (const struct sparc_gregset *gregset,
 }
 
 void
-sparc32_collect_gregset (const struct sparc_gregset *gregset,
+sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
 			 const struct regcache *regcache,
 			 int regnum, void *gregs)
 {
@@ -1972,23 +1972,23 @@  sparc32_collect_gregset (const struct sparc_gregset *gregset,
 
   if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
     regcache_raw_collect (regcache, SPARC32_PSR_REGNUM,
-			  regs + gregset->r_psr_offset);
+			  regs + gregmap->r_psr_offset);
 
   if (regnum == SPARC32_PC_REGNUM || regnum == -1)
     regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
-			  regs + gregset->r_pc_offset);
+			  regs + gregmap->r_pc_offset);
 
   if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
     regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
-			  regs + gregset->r_npc_offset);
+			  regs + gregmap->r_npc_offset);
 
   if (regnum == SPARC32_Y_REGNUM || regnum == -1)
     regcache_raw_collect (regcache, SPARC32_Y_REGNUM,
-			  regs + gregset->r_y_offset);
+			  regs + gregmap->r_y_offset);
 
   if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
     {
-      int offset = gregset->r_g1_offset;
+      int offset = gregmap->r_g1_offset;
 
       /* %g0 is always zero.  */
       for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
@@ -2003,9 +2003,9 @@  sparc32_collect_gregset (const struct sparc_gregset *gregset,
     {
       /* Not all of the register set variants include Locals and
          Inputs.  For those that don't, we read them off the stack.  */
-      if (gregset->r_l0_offset != -1)
+      if (gregmap->r_l0_offset != -1)
 	{
-	  int offset = gregset->r_l0_offset;
+	  int offset = gregmap->r_l0_offset;
 
 	  for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
 	    {
@@ -2018,7 +2018,7 @@  sparc32_collect_gregset (const struct sparc_gregset *gregset,
 }
 
 void
-sparc32_supply_fpregset (const struct sparc_fpregset *fpregset,
+sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap,
 			 struct regcache *regcache,
 			 int regnum, const void *fpregs)
 {
@@ -2029,16 +2029,16 @@  sparc32_supply_fpregset (const struct sparc_fpregset *fpregset,
     {
       if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
 	regcache_raw_supply (regcache, SPARC_F0_REGNUM + i,
-			     regs + fpregset->r_f0_offset + (i * 4));
+			     regs + fpregmap->r_f0_offset + (i * 4));
     }
 
   if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
     regcache_raw_supply (regcache, SPARC32_FSR_REGNUM,
-			 regs + fpregset->r_fsr_offset);
+			 regs + fpregmap->r_fsr_offset);
 }
 
 void
-sparc32_collect_fpregset (const struct sparc_fpregset *fpregset,
+sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap,
 			  const struct regcache *regcache,
 			  int regnum, void *fpregs)
 {
@@ -2049,19 +2049,19 @@  sparc32_collect_fpregset (const struct sparc_fpregset *fpregset,
     {
       if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
 	regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
-			      regs + fpregset->r_f0_offset + (i * 4));
+			      regs + fpregmap->r_f0_offset + (i * 4));
     }
 
   if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
     regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
-			  regs + fpregset->r_fsr_offset);
+			  regs + fpregmap->r_fsr_offset);
 }
 
 
 /* SunOS 4.  */
 
 /* From <machine/reg.h>.  */
-const struct sparc_gregset sparc32_sunos4_gregset =
+const struct sparc_gregmap sparc32_sunos4_gregmap =
 {
   0 * 4,			/* %psr */
   1 * 4,			/* %pc */
@@ -2073,13 +2073,13 @@  const struct sparc_gregset sparc32_sunos4_gregset =
   -1				/* %l0 */
 };
 
-const struct sparc_fpregset sparc32_sunos4_fpregset =
+const struct sparc_fpregmap sparc32_sunos4_fpregmap =
 {
   0 * 4,			/* %f0 */
   33 * 4,			/* %fsr */
 };
 
-const struct sparc_fpregset sparc32_bsd_fpregset =
+const struct sparc_fpregmap sparc32_bsd_fpregmap =
 {
   0 * 4,			/* %f0 */
   32 * 4,			/* %fsr */
diff --git a/gdb/sparc-tdep.h b/gdb/sparc-tdep.h
index a065ebe..12c8ef7 100644
--- a/gdb/sparc-tdep.h
+++ b/gdb/sparc-tdep.h
@@ -28,7 +28,7 @@  struct trad_frame_saved_reg;
 
 /* Register offsets for the general-purpose register set.  */
 
-struct sparc_gregset
+struct sparc_gregmap
 {
   int r_psr_offset;
   int r_pc_offset;
@@ -41,7 +41,7 @@  struct sparc_gregset
   int r_y_size;
 };
 
-struct sparc_fpregset
+struct sparc_fpregmap
 {
   int r_f0_offset;
   int r_fsr_offset;
@@ -206,20 +206,20 @@  extern void sparc_collect_rwindow (const struct regcache *regcache,
 				   CORE_ADDR sp, int regnum);
 
 /* Register offsets for SunOS 4.  */
-extern const struct sparc_gregset sparc32_sunos4_gregset;
-extern const struct sparc_fpregset sparc32_sunos4_fpregset;
-extern const struct sparc_fpregset sparc32_bsd_fpregset;
+extern const struct sparc_gregmap sparc32_sunos4_gregmap;
+extern const struct sparc_fpregmap sparc32_sunos4_fpregmap;
+extern const struct sparc_fpregmap sparc32_bsd_fpregmap;
 
-extern void sparc32_supply_gregset (const struct sparc_gregset *gregset,
+extern void sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
 				    struct regcache *regcache,
 				    int regnum, const void *gregs);
-extern void sparc32_collect_gregset (const struct sparc_gregset *gregset,
+extern void sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
 				     const struct regcache *regcache,
 				     int regnum, void *gregs);
-extern void sparc32_supply_fpregset (const struct sparc_fpregset *fpregset,
+extern void sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap,
 				     struct regcache *regcache,
 				     int regnum, const void *fpregs);
-extern void sparc32_collect_fpregset (const struct sparc_fpregset *fpregset,
+extern void sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap,
 				      const struct regcache *regcache,
 				      int regnum, void *fpregs);
 
@@ -228,8 +228,8 @@  extern int sparc_is_annulled_branch_insn (CORE_ADDR pc);
 /* Functions and variables exported from sparc-sol2-tdep.c.  */
 
 /* Register offsets for Solaris 2.  */
-extern const struct sparc_gregset sparc32_sol2_gregset;
-extern const struct sparc_fpregset sparc32_sol2_fpregset;
+extern const struct sparc_gregmap sparc32_sol2_gregmap;
+extern const struct sparc_fpregmap sparc32_sol2_fpregmap;
 
 extern int sparc_sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name);
 
@@ -241,7 +241,7 @@  extern void sparc32_sol2_init_abi (struct gdbarch_info info,
 /* Functions and variables exported from sparcnbsd-tdep.c.  */
 
 /* Register offsets for NetBSD.  */
-extern const struct sparc_gregset sparc32nbsd_gregset;
+extern const struct sparc_gregmap sparc32nbsd_gregmap;
 
 /* Return the address of a system call's alternative return
    address.  */
diff --git a/gdb/sparc64-linux-nat.c b/gdb/sparc64-linux-nat.c
index 80411dc..14db54f 100644
--- a/gdb/sparc64-linux-nat.c
+++ b/gdb/sparc64-linux-nat.c
@@ -30,7 +30,7 @@ 
 #include "target.h"
 #include "linux-nat.h"
 
-static const struct sparc_gregset sparc64_linux_ptrace_gregset =
+static const struct sparc_gregmap sparc64_linux_ptrace_gregmap =
 {
   16 * 8,			/* "tstate" */
   17 * 8,			/* %pc */
@@ -47,26 +47,26 @@  static const struct sparc_gregset sparc64_linux_ptrace_gregset =
 void
 supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
 {
-  sparc64_supply_gregset (sparc_gregset, regcache, -1, gregs);
+  sparc64_supply_gregset (sparc_gregmap, regcache, -1, gregs);
 }
 
 void
 supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
 {
-  sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, -1, fpregs);
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, -1, fpregs);
 }
 
 void
 fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
 {
-  sparc64_collect_gregset (sparc_gregset, regcache, regnum, gregs);
+  sparc64_collect_gregset (sparc_gregmap, regcache, regnum, gregs);
 }
 
 void
 fill_fpregset (const struct regcache *regcache,
 	       prfpregset_t *fpregs, int regnum)
 {
-  sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
@@ -80,7 +80,7 @@  _initialize_sparc64_linux_nat (void)
   /* Fill in the generic GNU/Linux methods.  */
   t = linux_target ();
 
-  sparc_fpregset = &sparc64_bsd_fpregset;
+  sparc_fpregmap = &sparc64_bsd_fpregmap;
 
   /* Add our register access methods.  */
   t->to_fetch_registers = sparc_fetch_inferior_registers;
@@ -89,5 +89,5 @@  _initialize_sparc64_linux_nat (void)
   /* Register the target.  */
   linux_nat_add_target (t);
 
-  sparc_gregset = &sparc64_linux_ptrace_gregset;
+  sparc_gregmap = &sparc64_linux_ptrace_gregmap;
 }
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
index a381d2a..6040526 100644
--- a/gdb/sparc64-linux-tdep.c
+++ b/gdb/sparc64-linux-tdep.c
@@ -139,7 +139,7 @@  sparc64_linux_step_trap (struct frame_info *frame, unsigned long insn)
 }
 
 
-const struct sparc_gregset sparc64_linux_core_gregset =
+const struct sparc_gregmap sparc64_linux_core_gregmap =
 {
   32 * 8,			/* %tstate */
   33 * 8,			/* %tpc */
@@ -158,7 +158,7 @@  sparc64_linux_supply_core_gregset (const struct regset *regset,
 				   struct regcache *regcache,
 				   int regnum, const void *gregs, size_t len)
 {
-  sparc64_supply_gregset (&sparc64_linux_core_gregset,
+  sparc64_supply_gregset (&sparc64_linux_core_gregmap,
 			  regcache, regnum, gregs);
 }
 
@@ -167,7 +167,7 @@  sparc64_linux_collect_core_gregset (const struct regset *regset,
 				    const struct regcache *regcache,
 				    int regnum, void *gregs, size_t len)
 {
-  sparc64_collect_gregset (&sparc64_linux_core_gregset,
+  sparc64_collect_gregset (&sparc64_linux_core_gregmap,
 			   regcache, regnum, gregs);
 }
 
@@ -176,7 +176,7 @@  sparc64_linux_supply_core_fpregset (const struct regset *regset,
 				    struct regcache *regcache,
 				    int regnum, const void *fpregs, size_t len)
 {
-  sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 static void
@@ -184,7 +184,7 @@  sparc64_linux_collect_core_fpregset (const struct regset *regset,
 				     const struct regcache *regcache,
 				     int regnum, void *fpregs, size_t len)
 {
-  sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 /* Set the program counter for process PTID to PC.  */
diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c
index 2c30261..507838a 100644
--- a/gdb/sparc64-sol2-tdep.c
+++ b/gdb/sparc64-sol2-tdep.c
@@ -33,7 +33,7 @@ 
 #include "solib-svr4.h"
 
 /* From <sys/regset.h>.  */
-const struct sparc_gregset sparc64_sol2_gregset =
+const struct sparc_gregmap sparc64_sol2_gregmap =
 {
   32 * 8,			/* "tstate" */
   33 * 8,			/* %pc */
@@ -46,7 +46,7 @@  const struct sparc_gregset sparc64_sol2_gregset =
   8				/* sizeof (%y) */
 };
 
-const struct sparc_fpregset sparc64_sol2_fpregset =
+const struct sparc_fpregmap sparc64_sol2_fpregmap =
 {
   0 * 8,			/* %f0 */
   33 * 8,			/* %fsr */
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 5d32560..40931d6 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -1240,7 +1240,7 @@  sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 #define PSR_XCC		0x000f0000
 
 void
-sparc64_supply_gregset (const struct sparc_gregset *gregset,
+sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
 			struct regcache *regcache,
 			int regnum, const void *gregs)
 {
@@ -1255,7 +1255,7 @@  sparc64_supply_gregset (const struct sparc_gregset *gregset,
     {
       if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
 	{
-	  int offset = gregset->r_tstate_offset;
+	  int offset = gregmap->r_tstate_offset;
 	  ULONGEST tstate, psr;
 	  gdb_byte buf[4];
 
@@ -1268,15 +1268,15 @@  sparc64_supply_gregset (const struct sparc_gregset *gregset,
 
       if (regnum == SPARC32_PC_REGNUM || regnum == -1)
 	regcache_raw_supply (regcache, SPARC32_PC_REGNUM,
-			     regs + gregset->r_pc_offset + 4);
+			     regs + gregmap->r_pc_offset + 4);
 
       if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
 	regcache_raw_supply (regcache, SPARC32_NPC_REGNUM,
-			     regs + gregset->r_npc_offset + 4);
+			     regs + gregmap->r_npc_offset + 4);
 
       if (regnum == SPARC32_Y_REGNUM || regnum == -1)
 	{
-	  int offset = gregset->r_y_offset + 8 - gregset->r_y_size;
+	  int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size;
 	  regcache_raw_supply (regcache, SPARC32_Y_REGNUM, regs + offset);
 	}
     }
@@ -1284,30 +1284,30 @@  sparc64_supply_gregset (const struct sparc_gregset *gregset,
     {
       if (regnum == SPARC64_STATE_REGNUM || regnum == -1)
 	regcache_raw_supply (regcache, SPARC64_STATE_REGNUM,
-			     regs + gregset->r_tstate_offset);
+			     regs + gregmap->r_tstate_offset);
 
       if (regnum == SPARC64_PC_REGNUM || regnum == -1)
 	regcache_raw_supply (regcache, SPARC64_PC_REGNUM,
-			     regs + gregset->r_pc_offset);
+			     regs + gregmap->r_pc_offset);
 
       if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
 	regcache_raw_supply (regcache, SPARC64_NPC_REGNUM,
-			     regs + gregset->r_npc_offset);
+			     regs + gregmap->r_npc_offset);
 
       if (regnum == SPARC64_Y_REGNUM || regnum == -1)
 	{
 	  gdb_byte buf[8];
 
 	  memset (buf, 0, 8);
-	  memcpy (buf + 8 - gregset->r_y_size,
-		  regs + gregset->r_y_offset, gregset->r_y_size);
+	  memcpy (buf + 8 - gregmap->r_y_size,
+		  regs + gregmap->r_y_offset, gregmap->r_y_size);
 	  regcache_raw_supply (regcache, SPARC64_Y_REGNUM, buf);
 	}
 
       if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1)
-	  && gregset->r_fprs_offset != -1)
+	  && gregmap->r_fprs_offset != -1)
 	regcache_raw_supply (regcache, SPARC64_FPRS_REGNUM,
-			     regs + gregset->r_fprs_offset);
+			     regs + gregmap->r_fprs_offset);
     }
 
   if (regnum == SPARC_G0_REGNUM || regnum == -1)
@@ -1315,7 +1315,7 @@  sparc64_supply_gregset (const struct sparc_gregset *gregset,
 
   if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
     {
-      int offset = gregset->r_g1_offset;
+      int offset = gregmap->r_g1_offset;
 
       if (sparc32)
 	offset += 4;
@@ -1332,7 +1332,7 @@  sparc64_supply_gregset (const struct sparc_gregset *gregset,
     {
       /* Not all of the register set variants include Locals and
          Inputs.  For those that don't, we read them off the stack.  */
-      if (gregset->r_l0_offset == -1)
+      if (gregmap->r_l0_offset == -1)
 	{
 	  ULONGEST sp;
 
@@ -1341,7 +1341,7 @@  sparc64_supply_gregset (const struct sparc_gregset *gregset,
 	}
       else
 	{
-	  int offset = gregset->r_l0_offset;
+	  int offset = gregmap->r_l0_offset;
 
 	  if (sparc32)
 	    offset += 4;
@@ -1357,7 +1357,7 @@  sparc64_supply_gregset (const struct sparc_gregset *gregset,
 }
 
 void
-sparc64_collect_gregset (const struct sparc_gregset *gregset,
+sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
 			 const struct regcache *regcache,
 			 int regnum, void *gregs)
 {
@@ -1371,7 +1371,7 @@  sparc64_collect_gregset (const struct sparc_gregset *gregset,
     {
       if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
 	{
-	  int offset = gregset->r_tstate_offset;
+	  int offset = gregmap->r_tstate_offset;
 	  ULONGEST tstate, psr;
 	  gdb_byte buf[8];
 
@@ -1387,15 +1387,15 @@  sparc64_collect_gregset (const struct sparc_gregset *gregset,
 
       if (regnum == SPARC32_PC_REGNUM || regnum == -1)
 	regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
-			      regs + gregset->r_pc_offset + 4);
+			      regs + gregmap->r_pc_offset + 4);
 
       if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
 	regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
-			      regs + gregset->r_npc_offset + 4);
+			      regs + gregmap->r_npc_offset + 4);
 
       if (regnum == SPARC32_Y_REGNUM || regnum == -1)
 	{
-	  int offset = gregset->r_y_offset + 8 - gregset->r_y_size;
+	  int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size;
 	  regcache_raw_collect (regcache, SPARC32_Y_REGNUM, regs + offset);
 	}
     }
@@ -1403,35 +1403,35 @@  sparc64_collect_gregset (const struct sparc_gregset *gregset,
     {
       if (regnum == SPARC64_STATE_REGNUM || regnum == -1)
 	regcache_raw_collect (regcache, SPARC64_STATE_REGNUM,
-			      regs + gregset->r_tstate_offset);
+			      regs + gregmap->r_tstate_offset);
 
       if (regnum == SPARC64_PC_REGNUM || regnum == -1)
 	regcache_raw_collect (regcache, SPARC64_PC_REGNUM,
-			      regs + gregset->r_pc_offset);
+			      regs + gregmap->r_pc_offset);
 
       if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
 	regcache_raw_collect (regcache, SPARC64_NPC_REGNUM,
-			      regs + gregset->r_npc_offset);
+			      regs + gregmap->r_npc_offset);
 
       if (regnum == SPARC64_Y_REGNUM || regnum == -1)
 	{
 	  gdb_byte buf[8];
 
 	  regcache_raw_collect (regcache, SPARC64_Y_REGNUM, buf);
-	  memcpy (regs + gregset->r_y_offset,
-		  buf + 8 - gregset->r_y_size, gregset->r_y_size);
+	  memcpy (regs + gregmap->r_y_offset,
+		  buf + 8 - gregmap->r_y_size, gregmap->r_y_size);
 	}
 
       if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1)
-	  && gregset->r_fprs_offset != -1)
+	  && gregmap->r_fprs_offset != -1)
 	regcache_raw_collect (regcache, SPARC64_FPRS_REGNUM,
-			      regs + gregset->r_fprs_offset);
+			      regs + gregmap->r_fprs_offset);
 
     }
 
   if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
     {
-      int offset = gregset->r_g1_offset;
+      int offset = gregmap->r_g1_offset;
 
       if (sparc32)
 	offset += 4;
@@ -1449,9 +1449,9 @@  sparc64_collect_gregset (const struct sparc_gregset *gregset,
     {
       /* Not all of the register set variants include Locals and
          Inputs.  For those that don't, we read them off the stack.  */
-      if (gregset->r_l0_offset != -1)
+      if (gregmap->r_l0_offset != -1)
 	{
-	  int offset = gregset->r_l0_offset;
+	  int offset = gregmap->r_l0_offset;
 
 	  if (sparc32)
 	    offset += 4;
@@ -1467,7 +1467,7 @@  sparc64_collect_gregset (const struct sparc_gregset *gregset,
 }
 
 void
-sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
+sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
 			 struct regcache *regcache,
 			 int regnum, const void *fpregs)
 {
@@ -1479,14 +1479,14 @@  sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
     {
       if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
 	regcache_raw_supply (regcache, SPARC_F0_REGNUM + i,
-			     regs + fpregset->r_f0_offset + (i * 4));
+			     regs + fpregmap->r_f0_offset + (i * 4));
     }
 
   if (sparc32)
     {
       if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
 	regcache_raw_supply (regcache, SPARC32_FSR_REGNUM,
-			     regs + fpregset->r_fsr_offset);
+			     regs + fpregmap->r_fsr_offset);
     }
   else
     {
@@ -1494,18 +1494,18 @@  sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
 	{
 	  if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1)
 	    regcache_raw_supply (regcache, SPARC64_F32_REGNUM + i,
-				 (regs + fpregset->r_f0_offset
+				 (regs + fpregmap->r_f0_offset
 				  + (32 * 4) + (i * 8)));
 	}
 
       if (regnum == SPARC64_FSR_REGNUM || regnum == -1)
 	regcache_raw_supply (regcache, SPARC64_FSR_REGNUM,
-			     regs + fpregset->r_fsr_offset);
+			     regs + fpregmap->r_fsr_offset);
     }
 }
 
 void
-sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
+sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
 			  const struct regcache *regcache,
 			  int regnum, void *fpregs)
 {
@@ -1517,14 +1517,14 @@  sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
     {
       if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
 	regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
-			      regs + fpregset->r_f0_offset + (i * 4));
+			      regs + fpregmap->r_f0_offset + (i * 4));
     }
 
   if (sparc32)
     {
       if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
 	regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
-			      regs + fpregset->r_fsr_offset);
+			      regs + fpregmap->r_fsr_offset);
     }
   else
     {
@@ -1532,17 +1532,17 @@  sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
 	{
 	  if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1)
 	    regcache_raw_collect (regcache, SPARC64_F32_REGNUM + i,
-				  (regs + fpregset->r_f0_offset
+				  (regs + fpregmap->r_f0_offset
 				   + (32 * 4) + (i * 8)));
 	}
 
       if (regnum == SPARC64_FSR_REGNUM || regnum == -1)
 	regcache_raw_collect (regcache, SPARC64_FSR_REGNUM,
-			      regs + fpregset->r_fsr_offset);
+			      regs + fpregmap->r_fsr_offset);
     }
 }
 
-const struct sparc_fpregset sparc64_bsd_fpregset =
+const struct sparc_fpregmap sparc64_bsd_fpregmap =
 {
   0 * 8,			/* %f0 */
   32 * 8,			/* %fsr */
diff --git a/gdb/sparc64-tdep.h b/gdb/sparc64-tdep.h
index 4b69c0d..3cb7e97 100644
--- a/gdb/sparc64-tdep.h
+++ b/gdb/sparc64-tdep.h
@@ -23,7 +23,7 @@ 
 struct frame_info;
 struct gdbarch;
 struct regcache;
-struct sparc_gregset;
+struct sparc_gregmap;
 struct trad_frame_saved_reg;
 
 #include "sparc-tdep.h"
@@ -97,24 +97,24 @@  enum sparc64_regnum
 extern void sparc64_init_abi (struct gdbarch_info info,
 			      struct gdbarch *gdbarch);
 
-extern void sparc64_supply_gregset (const struct sparc_gregset *gregset,
+extern void sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
 				    struct regcache *regcache,
 				    int regnum, const void *gregs);
-extern void sparc64_collect_gregset (const struct sparc_gregset *gregset,
+extern void sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
 				     const struct regcache *regcache,
 				     int regnum, void *gregs);
-extern void sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
+extern void sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
 				     struct regcache *regcache,
 				     int regnum, const void *fpregs);
-extern void sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
+extern void sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
 				      const struct regcache *regcache,
 				      int regnum, void *fpregs);
 
 /* Functions and variables exported from sparc64-sol2-tdep.c.  */
 
 /* Register offsets for Solaris 2.  */
-extern const struct sparc_gregset sparc64_sol2_gregset;
-extern const struct sparc_fpregset sparc64_sol2_fpregset;
+extern const struct sparc_gregmap sparc64_sol2_gregmap;
+extern const struct sparc_fpregmap sparc64_sol2_fpregmap;
 
 extern void sparc64_sol2_init_abi (struct gdbarch_info info,
 				   struct gdbarch *gdbarch);
@@ -122,17 +122,17 @@  extern void sparc64_sol2_init_abi (struct gdbarch_info info,
 /* Variables exported from sparc64fbsd-tdep.c.  */
 
 /* Register offsets for FreeBSD/sparc64.  */
-extern const struct sparc_gregset sparc64fbsd_gregset;
+extern const struct sparc_gregmap sparc64fbsd_gregmap;
 
 /* Functions and variables exported from sparc64nbsd-tdep.c.  */
 
 /* Register offsets for NetBSD/sparc64.  */
-extern const struct sparc_gregset sparc64nbsd_gregset;
+extern const struct sparc_gregmap sparc64nbsd_gregmap;
 
 extern struct trad_frame_saved_reg *
   sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
 				     struct frame_info *next_frame);
 
-extern const struct sparc_fpregset sparc64_bsd_fpregset;
+extern const struct sparc_fpregmap sparc64_bsd_fpregmap;
 
 #endif /* sparc64-tdep.h */
diff --git a/gdb/sparc64fbsd-nat.c b/gdb/sparc64fbsd-nat.c
index 7c772d4..59a2004 100644
--- a/gdb/sparc64fbsd-nat.c
+++ b/gdb/sparc64fbsd-nat.c
@@ -75,7 +75,7 @@  _initialize_sparc64fbsd_nat (void)
   t->to_make_corefile_notes = fbsd_make_corefile_notes;
   add_target (t);
 
-  sparc_gregset = &sparc64fbsd_gregset;
+  sparc_gregmap = &sparc64fbsd_gregmap;
 
   /* Support debugging kernel virtual memory images.  */
   bsd_kvm_add_target (sparc64fbsd_kvm_supply_pcb);
diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c
index 96bf390..6ca87dc 100644
--- a/gdb/sparc64fbsd-tdep.c
+++ b/gdb/sparc64fbsd-tdep.c
@@ -34,7 +34,7 @@ 
 #include "solib-svr4.h"
 
 /* From <machine/reg.h>.  */
-const struct sparc_gregset sparc64fbsd_gregset =
+const struct sparc_gregmap sparc64fbsd_gregmap =
 {
   26 * 8,			/* "tstate" */
   25 * 8,			/* %pc */
@@ -53,7 +53,7 @@  sparc64fbsd_supply_gregset (const struct regset *regset,
 			    struct regcache *regcache,
 			    int regnum, const void *gregs, size_t len)
 {
-  sparc64_supply_gregset (&sparc64fbsd_gregset, regcache, regnum, gregs);
+  sparc64_supply_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
 }
 
 static void
@@ -61,7 +61,7 @@  sparc64fbsd_collect_gregset (const struct regset *regset,
 			     const struct regcache *regcache,
 			     int regnum, void *gregs, size_t len)
 {
-  sparc64_collect_gregset (&sparc64fbsd_gregset, regcache, regnum, gregs);
+  sparc64_collect_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
 }
 
 static void
@@ -69,7 +69,7 @@  sparc64fbsd_supply_fpregset (const struct regset *regset,
 			     struct regcache *regcache,
 			     int regnum, const void *fpregs, size_t len)
 {
-  sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 static void
@@ -77,7 +77,7 @@  sparc64fbsd_collect_fpregset (const struct regset *regset,
 			      const struct regcache *regcache,
 			      int regnum, void *fpregs, size_t len)
 {
-  sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 
diff --git a/gdb/sparc64nbsd-nat.c b/gdb/sparc64nbsd-nat.c
index f8db7fa..bfcf74a 100644
--- a/gdb/sparc64nbsd-nat.c
+++ b/gdb/sparc64nbsd-nat.c
@@ -30,55 +30,55 @@ 
    traced process is 32-bit or 64-bit.  */
 
 static void
-sparc64nbsd_supply_gregset (const struct sparc_gregset *gregset,
+sparc64nbsd_supply_gregset (const struct sparc_gregmap *gregmap,
 			    struct regcache *regcache,
 			    int regnum, const void *gregs)
 {
   int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
 
   if (sparc32)
-    sparc32_supply_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs);
+    sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
   else
-    sparc64_supply_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs);
+    sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
 }
 
 static void
-sparc64nbsd_collect_gregset (const struct sparc_gregset *gregset,
+sparc64nbsd_collect_gregset (const struct sparc_gregmap *gregmap,
 			     const struct regcache *regcache,
 			     int regnum, void *gregs)
 {
   int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
 
   if (sparc32)
-    sparc32_collect_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs);
+    sparc32_collect_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
   else
-    sparc64_collect_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs);
+    sparc64_collect_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
 }
 
 static void
-sparc64nbsd_supply_fpregset (const struct sparc_fpregset *fpregset,
+sparc64nbsd_supply_fpregset (const struct sparc_fpregmap *fpregmap,
 			     struct regcache *regcache,
 			     int regnum, const void *fpregs)
 {
   int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
 
   if (sparc32)
-    sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
+    sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
   else
-    sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+    sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 static void
-sparc64nbsd_collect_fpregset (const struct sparc_fpregset *fpregset,
+sparc64nbsd_collect_fpregset (const struct sparc_fpregmap *fpregmap,
 			      const struct regcache *regcache,
 			      int regnum, void *fpregs)
 {
   int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
 
   if (sparc32)
-    sparc32_collect_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
+    sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
   else
-    sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+    sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 /* Determine whether `gregset_t' contains register REGNUM.  */
diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c
index 744a5f2..fac4c27 100644
--- a/gdb/sparc64nbsd-tdep.c
+++ b/gdb/sparc64nbsd-tdep.c
@@ -37,7 +37,7 @@ 
 #include "nbsd-tdep.h"
 
 /* From <machine/reg.h>.  */
-const struct sparc_gregset sparc64nbsd_gregset =
+const struct sparc_gregmap sparc64nbsd_gregmap =
 {
   0 * 8,			/* "tstate" */
   1 * 8,			/* %pc */
@@ -56,7 +56,7 @@  sparc64nbsd_supply_gregset (const struct regset *regset,
 			    struct regcache *regcache,
 			    int regnum, const void *gregs, size_t len)
 {
-  sparc64_supply_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs);
+  sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
 }
 
 static void
@@ -64,7 +64,7 @@  sparc64nbsd_supply_fpregset (const struct regset *regset,
 			     struct regcache *regcache,
 			     int regnum, const void *fpregs, size_t len)
 {
-  sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 
diff --git a/gdb/sparc64obsd-nat.c b/gdb/sparc64obsd-nat.c
index a6cf8b3..8b5423c 100644
--- a/gdb/sparc64obsd-nat.c
+++ b/gdb/sparc64obsd-nat.c
@@ -120,8 +120,8 @@  _initialize_sparc64obsd_nat (void)
   sparc_gregset_supplies_p = sparc64obsd_gregset_supplies_p;
   sparc_fpregset_supplies_p = sparc64obsd_fpregset_supplies_p;
 
-  sparc_gregset = &sparc64nbsd_gregset;
-  sparc_fpregset = &sparc64_bsd_fpregset;
+  sparc_gregmap = &sparc64nbsd_gregmap;
+  sparc_fpregmap = &sparc64_bsd_fpregmap;
 
   /* Add some extra features to the generic SPARC target.  */
   obsd_add_target (sparc_target ());
diff --git a/gdb/sparc64obsd-tdep.c b/gdb/sparc64obsd-tdep.c
index e2dce3b..8f94574 100644
--- a/gdb/sparc64obsd-tdep.c
+++ b/gdb/sparc64obsd-tdep.c
@@ -46,7 +46,7 @@ 
    match the ptrace(2) layout.  */
 
 /* From <machine/reg.h>.  */
-const struct sparc_gregset sparc64obsd_gregset =
+const struct sparc_gregmap sparc64obsd_gregmap =
 {
   0 * 8,			/* "tstate" */
   1 * 8,			/* %pc */
@@ -59,7 +59,7 @@  const struct sparc_gregset sparc64obsd_gregset =
   4				/* sizeof (%y) */
 };
 
-const struct sparc_gregset sparc64obsd_core_gregset =
+const struct sparc_gregmap sparc64obsd_core_gregmap =
 {
   0 * 8,			/* "tstate" */
   1 * 8,			/* %pc */
@@ -81,12 +81,12 @@  sparc64obsd_supply_gregset (const struct regset *regset,
 
   if (len < 832)
     {
-      sparc64_supply_gregset (&sparc64obsd_gregset, regcache, regnum, gregs);
+      sparc64_supply_gregset (&sparc64obsd_gregmap, regcache, regnum, gregs);
       return;
     }
 
-  sparc64_supply_gregset (&sparc64obsd_core_gregset, regcache, regnum, gregs);
-  sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_supply_gregset (&sparc64obsd_core_gregmap, regcache, regnum, gregs);
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 static void
@@ -94,7 +94,7 @@  sparc64obsd_supply_fpregset (const struct regset *regset,
 			     struct regcache *regcache,
 			     int regnum, const void *fpregs, size_t len)
 {
-  sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
 }
 
 
diff --git a/gdb/sparcnbsd-nat.c b/gdb/sparcnbsd-nat.c
index c7eb118..0393e34 100644
--- a/gdb/sparcnbsd-nat.c
+++ b/gdb/sparcnbsd-nat.c
@@ -62,8 +62,8 @@  void _initialize_sparcnbsd_nat (void);
 void
 _initialize_sparcnbsd_nat (void)
 {
-  sparc_gregset = &sparc32nbsd_gregset;
-  sparc_fpregset = &sparc32_bsd_fpregset;
+  sparc_gregmap = &sparc32nbsd_gregmap;
+  sparc_fpregmap = &sparc32_bsd_fpregmap;
 
   /* We've got nothing to add to the generic SPARC target.  */
   add_target (sparc_target ());
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index 14fbed9..ac94f10 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -41,7 +41,7 @@ 
 #define X_RS2(i) ((i) & 0x1f)
 #define X_I(i) (((i) >> 13) & 1)
 
-const struct sparc_gregset sparc32nbsd_gregset =
+const struct sparc_gregmap sparc32nbsd_gregmap =
 {
   0 * 4,			/* %psr */
   1 * 4,			/* %pc */
@@ -58,13 +58,13 @@  sparc32nbsd_supply_gregset (const struct regset *regset,
 			    struct regcache *regcache,
 			    int regnum, const void *gregs, size_t len)
 {
-  sparc32_supply_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs);
+  sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
 
   /* Traditional NetBSD core files don't use multiple register sets.
      Instead, the general-purpose and floating-point registers are
      lumped together in a single section.  */
   if (len >= 212)
-    sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum,
+    sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum,
 			     (const char *) gregs + 80);
 }
 
@@ -73,7 +73,7 @@  sparc32nbsd_supply_fpregset (const struct regset *regset,
 			     struct regcache *regcache,
 			     int regnum, const void *fpregs, size_t len)
 {
-  sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
+  sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
 }