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.
This commit is contained in:
parent
dc71152484
commit
03f50fc878
24 changed files with 145 additions and 138 deletions
|
@ -910,27 +910,27 @@ sparc64_pseudo_register_read (struct gdbarch *gdbarch,
|
|||
if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D30_REGNUM)
|
||||
{
|
||||
regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC64_D0_REGNUM);
|
||||
status = regcache_raw_read (regcache, regnum, buf);
|
||||
status = regcache->raw_read (regnum, buf);
|
||||
if (status == REG_VALID)
|
||||
status = regcache_raw_read (regcache, regnum + 1, buf + 4);
|
||||
status = regcache->raw_read (regnum + 1, buf + 4);
|
||||
return status;
|
||||
}
|
||||
else if (regnum >= SPARC64_D32_REGNUM && regnum <= SPARC64_D62_REGNUM)
|
||||
{
|
||||
regnum = SPARC64_F32_REGNUM + (regnum - SPARC64_D32_REGNUM);
|
||||
return regcache_raw_read (regcache, regnum, buf);
|
||||
return regcache->raw_read (regnum, buf);
|
||||
}
|
||||
else if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q28_REGNUM)
|
||||
{
|
||||
regnum = SPARC_F0_REGNUM + 4 * (regnum - SPARC64_Q0_REGNUM);
|
||||
|
||||
status = regcache_raw_read (regcache, regnum, buf);
|
||||
status = regcache->raw_read (regnum, buf);
|
||||
if (status == REG_VALID)
|
||||
status = regcache_raw_read (regcache, regnum + 1, buf + 4);
|
||||
status = regcache->raw_read (regnum + 1, buf + 4);
|
||||
if (status == REG_VALID)
|
||||
status = regcache_raw_read (regcache, regnum + 2, buf + 8);
|
||||
status = regcache->raw_read (regnum + 2, buf + 8);
|
||||
if (status == REG_VALID)
|
||||
status = regcache_raw_read (regcache, regnum + 3, buf + 12);
|
||||
status = regcache->raw_read (regnum + 3, buf + 12);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -938,9 +938,9 @@ sparc64_pseudo_register_read (struct gdbarch *gdbarch,
|
|||
{
|
||||
regnum = SPARC64_F32_REGNUM + 2 * (regnum - SPARC64_Q32_REGNUM);
|
||||
|
||||
status = regcache_raw_read (regcache, regnum, buf);
|
||||
status = regcache->raw_read (regnum, buf);
|
||||
if (status == REG_VALID)
|
||||
status = regcache_raw_read (regcache, regnum + 1, buf + 8);
|
||||
status = regcache->raw_read (regnum + 1, buf + 8);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -951,7 +951,7 @@ sparc64_pseudo_register_read (struct gdbarch *gdbarch,
|
|||
{
|
||||
ULONGEST state;
|
||||
|
||||
status = regcache_raw_read_unsigned (regcache, SPARC64_STATE_REGNUM, &state);
|
||||
status = regcache->raw_read (SPARC64_STATE_REGNUM, &state);
|
||||
if (status != REG_VALID)
|
||||
return status;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue