diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-03-28 17:34:19 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-05-21 17:49:17 +0200 |
commit | b4fd25c939a2dcf09c98c53c61ee17fc792e5be6 (patch) | |
tree | 6abb9231c351e0857b840b17896af858b274c4dc /gdb/sparc64-tdep.c | |
parent | 8fea322418c158d096d930c0d0057c684f1fc7ca (diff) | |
download | fsf-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/sparc64-tdep.c')
-rw-r--r-- | gdb/sparc64-tdep.c | 82 |
1 files changed, 41 insertions, 41 deletions
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 */ |