aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2018-01-22 11:02:49 +0000
committerYao Qi <yao.qi@linaro.org>2018-01-22 11:02:49 +0000
commit03f50fc878f75fcdebf0e3273f201fb4b62b0bae (patch)
treeff0d317fe0e2f6c91c569681785a1d26a11d33bb /gdb/rs6000-tdep.c
parentdc71152484248c0d8075618ec2146db4ea173b12 (diff)
downloadgdb-03f50fc878f75fcdebf0e3273f201fb4b62b0bae.zip
gdb-03f50fc878f75fcdebf0e3273f201fb4b62b0bae.tar.gz
gdb-03f50fc878f75fcdebf0e3273f201fb4b62b0bae.tar.bz2
Replace regcache_raw_read with regcache->raw_read
The patch later in this series will move regcache's raw_read and cooked_read methods to a new class regcache_read, and regcache is dervied from it. Also pass regcache_read instead of regcache to gdbarch methods pseudo_register_read and pseudo_register_read_value. In order to prepare for this change, this patch changes regcache_raw_read to regcache->raw_read. On the other hand, since we are in C++, I prefer using class method (regcache->raw_read). gdb: 2018-01-22 Yao Qi <yao.qi@linaro.org> * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache method raw_read instead of regcache_raw_read. * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise. * arm-tdep.c (arm_neon_quad_read): Likewise. * avr-tdep.c (avr_pseudo_register_read): Likewise. * bfin-tdep.c (bfin_pseudo_register_read): Likewise. * frv-tdep.c (frv_pseudo_register_read): Likewise. * h8300-tdep.c (h8300_pseudo_register_read): Likewise. * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise. (i386_pseudo_register_read_into_value): Likewise. * mep-tdep.c (mep_pseudo_cr32_read): Likewise. * msp430-tdep.c (msp430_pseudo_register_read): Likewise. * nds32-tdep.c (nds32_pseudo_register_read): Likewise. * rl78-tdep.c (rl78_pseudo_register_read): Likewise. * s390-linux-tdep.c (s390_pseudo_register_read): Likewise. * sparc-tdep.c (sparc32_pseudo_register_read): Likewise. * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise. * spu-tdep.c (spu_pseudo_register_read_spu): Likewise. * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index e5a265d..f81064e 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2746,19 +2746,19 @@ dfp_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
/* Read two FP registers to form a whole dl register. */
- status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum +
- 2 * reg_index, buffer);
+ status = regcache->raw_read (tdep->ppc_fp0_regnum +
+ 2 * reg_index, buffer);
if (status == REG_VALID)
- status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum +
- 2 * reg_index + 1, buffer + 8);
+ status = regcache->raw_read (tdep->ppc_fp0_regnum +
+ 2 * reg_index + 1, buffer + 8);
}
else
{
- status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum +
- 2 * reg_index + 1, buffer);
+ status = regcache->raw_read (tdep->ppc_fp0_regnum +
+ 2 * reg_index + 1, buffer);
if (status == REG_VALID)
- status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum +
- 2 * reg_index, buffer + 8);
+ status = regcache->raw_read (tdep->ppc_fp0_regnum +
+ 2 * reg_index, buffer + 8);
}
return status;
@@ -2801,25 +2801,25 @@ vsx_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
/* Read the portion that overlaps the VMX registers. */
if (reg_index > 31)
- status = regcache_raw_read (regcache, tdep->ppc_vr0_regnum +
- reg_index - 32, buffer);
+ status = regcache->raw_read (tdep->ppc_vr0_regnum +
+ reg_index - 32, buffer);
else
/* Read the portion that overlaps the FPR registers. */
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
- status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum +
- reg_index, buffer);
+ status = regcache->raw_read (tdep->ppc_fp0_regnum +
+ reg_index, buffer);
if (status == REG_VALID)
- status = regcache_raw_read (regcache, tdep->ppc_vsr0_upper_regnum +
- reg_index, buffer + 8);
+ status = regcache->raw_read (tdep->ppc_vsr0_upper_regnum +
+ reg_index, buffer + 8);
}
else
{
- status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum +
- reg_index, buffer + 8);
+ status = regcache->raw_read (tdep->ppc_fp0_regnum +
+ reg_index, buffer + 8);
if (status == REG_VALID)
- status = regcache_raw_read (regcache, tdep->ppc_vsr0_upper_regnum +
- reg_index, buffer);
+ status = regcache->raw_read (tdep->ppc_vsr0_upper_regnum +
+ reg_index, buffer);
}
return status;