aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-tdep.c
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2014-03-28 17:34:19 +0000
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-05-21 17:49:17 +0200
commitb4fd25c939a2dcf09c98c53c61ee17fc792e5be6 (patch)
tree6abb9231c351e0857b840b17896af858b274c4dc /gdb/sparc-tdep.c
parent8fea322418c158d096d930c0d0057c684f1fc7ca (diff)
downloadfsf-binutils-gdb-b4fd25c939a2dcf09c98c53c61ee17fc792e5be6.zip
fsf-binutils-gdb-b4fd25c939a2dcf09c98c53c61ee17fc792e5be6.tar.gz
fsf-binutils-gdb-b4fd25c939a2dcf09c98c53c61ee17fc792e5be6.tar.bz2
SPARC: Rename register maps from "*regset" to "*regmap"
Clear 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.
Diffstat (limited to 'gdb/sparc-tdep.c')
-rw-r--r--gdb/sparc-tdep.c50
1 files changed, 25 insertions, 25 deletions
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 */