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:
Yao Qi 2018-01-22 11:02:49 +00:00
parent dc71152484
commit 03f50fc878
24 changed files with 145 additions and 138 deletions

View file

@ -1,3 +1,25 @@
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.
2018-01-22 Yao Qi <yao.qi@linaro.org> 2018-01-22 Yao Qi <yao.qi@linaro.org>
* Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o. * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.

View file

@ -2245,7 +2245,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch,
unsigned v_regnum; unsigned v_regnum;
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_Q0_REGNUM; v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_Q0_REGNUM;
status = regcache_raw_read (regcache, v_regnum, reg_buf); status = regcache->raw_read (v_regnum, reg_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));
@ -2260,7 +2260,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch,
unsigned v_regnum; unsigned v_regnum;
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_D0_REGNUM; v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_D0_REGNUM;
status = regcache_raw_read (regcache, v_regnum, reg_buf); status = regcache->raw_read (v_regnum, reg_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));
@ -2275,7 +2275,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch,
unsigned v_regnum; unsigned v_regnum;
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_S0_REGNUM; v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_S0_REGNUM;
status = regcache_raw_read (regcache, v_regnum, reg_buf); status = regcache->raw_read (v_regnum, reg_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));
@ -2290,7 +2290,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch,
unsigned v_regnum; unsigned v_regnum;
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_H0_REGNUM; v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_H0_REGNUM;
status = regcache_raw_read (regcache, v_regnum, reg_buf); status = regcache->raw_read (v_regnum, reg_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));
@ -2305,7 +2305,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch,
unsigned v_regnum; unsigned v_regnum;
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_B0_REGNUM; v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_B0_REGNUM;
status = regcache_raw_read (regcache, v_regnum, reg_buf); status = regcache->raw_read (v_regnum, reg_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));

View file

@ -369,8 +369,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
if (gpnum >= AMD64_NUM_LOWER_BYTE_REGS) if (gpnum >= AMD64_NUM_LOWER_BYTE_REGS)
{ {
/* Special handling for AH, BH, CH, DH. */ /* Special handling for AH, BH, CH, DH. */
status = regcache_raw_read (regcache, status = regcache->raw_read (gpnum - AMD64_NUM_LOWER_BYTE_REGS,
gpnum - AMD64_NUM_LOWER_BYTE_REGS,
raw_buf); raw_buf);
if (status == REG_VALID) if (status == REG_VALID)
memcpy (buf, raw_buf + 1, 1); memcpy (buf, raw_buf + 1, 1);
@ -380,7 +379,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
} }
else else
{ {
status = regcache_raw_read (regcache, gpnum, raw_buf); status = regcache->raw_read (gpnum, raw_buf);
if (status == REG_VALID) if (status == REG_VALID)
memcpy (buf, raw_buf, 1); memcpy (buf, raw_buf, 1);
else else
@ -392,7 +391,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
{ {
int gpnum = regnum - tdep->eax_regnum; int gpnum = regnum - tdep->eax_regnum;
/* Extract (always little endian). */ /* Extract (always little endian). */
status = regcache_raw_read (regcache, gpnum, raw_buf); status = regcache->raw_read (gpnum, raw_buf);
if (status == REG_VALID) if (status == REG_VALID)
memcpy (buf, raw_buf, 4); memcpy (buf, raw_buf, 4);
else else

View file

@ -8696,13 +8696,13 @@ arm_neon_quad_read (struct gdbarch *gdbarch, struct regcache *regcache,
else else
offset = 0; offset = 0;
status = regcache_raw_read (regcache, double_regnum, reg_buf); status = regcache->raw_read (double_regnum, reg_buf);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
memcpy (buf + offset, reg_buf, 8); memcpy (buf + offset, reg_buf, 8);
offset = 8 - offset; offset = 8 - offset;
status = regcache_raw_read (regcache, double_regnum + 1, reg_buf); status = regcache->raw_read (double_regnum + 1, reg_buf);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
memcpy (buf + offset, reg_buf, 8); memcpy (buf + offset, reg_buf, 8);
@ -8742,7 +8742,7 @@ arm_pseudo_read (struct gdbarch *gdbarch, struct regcache *regcache,
double_regnum = user_reg_map_name_to_regnum (gdbarch, name_buf, double_regnum = user_reg_map_name_to_regnum (gdbarch, name_buf,
strlen (name_buf)); strlen (name_buf));
status = regcache_raw_read (regcache, double_regnum, reg_buf); status = regcache->raw_read (double_regnum, reg_buf);
if (status == REG_VALID) if (status == REG_VALID)
memcpy (buf, reg_buf + offset, 4); memcpy (buf, reg_buf + offset, 4);
return status; return status;

View file

@ -391,7 +391,7 @@ avr_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
switch (regnum) switch (regnum)
{ {
case AVR_PSEUDO_PC_REGNUM: case AVR_PSEUDO_PC_REGNUM:
status = regcache_raw_read_unsigned (regcache, AVR_PC_REGNUM, &val); status = regcache->raw_read (AVR_PC_REGNUM, &val);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
val >>= 1; val >>= 1;

View file

@ -699,7 +699,7 @@ bfin_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
_("invalid register number %d"), regnum); _("invalid register number %d"), regnum);
/* Extract the CC bit from the ASTAT register. */ /* Extract the CC bit from the ASTAT register. */
status = regcache_raw_read (regcache, BFIN_ASTAT_REGNUM, buf); status = regcache->raw_read (BFIN_ASTAT_REGNUM, buf);
if (status == REG_VALID) if (status == REG_VALID)
{ {
buffer[1] = buffer[2] = buffer[3] = 0; buffer[1] = buffer[2] = buffer[3] = 0;

View file

@ -302,9 +302,9 @@ frv_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
if (reg == iacc0_regnum) if (reg == iacc0_regnum)
{ {
status = regcache_raw_read (regcache, iacc0h_regnum, buffer); status = regcache->raw_read (iacc0h_regnum, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4); status = regcache->raw_read (iacc0l_regnum, (bfd_byte *) buffer + 4);
} }
else if (accg0_regnum <= reg && reg <= accg7_regnum) else if (accg0_regnum <= reg && reg <= accg7_regnum)
{ {
@ -315,7 +315,7 @@ frv_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int byte_num = (reg - accg0_regnum) % 4; int byte_num = (reg - accg0_regnum) % 4;
gdb_byte buf[4]; gdb_byte buf[4];
status = regcache_raw_read (regcache, raw_regnum, buf); status = regcache->raw_read (raw_regnum, buf);
if (status == REG_VALID) if (status == REG_VALID)
{ {
memset (buffer, 0, 4); memset (buffer, 0, 4);

View file

@ -1167,7 +1167,7 @@ pseudo_from_raw_register (struct gdbarch *gdbarch, struct regcache *regcache,
enum register_status status; enum register_status status;
ULONGEST val; ULONGEST val;
status = regcache_raw_read_unsigned (regcache, raw_regno, &val); status = regcache->raw_read (raw_regno, &val);
if (status == REG_VALID) if (status == REG_VALID)
store_unsigned_integer (buf, store_unsigned_integer (buf,
register_size (gdbarch, pseudo_regno), register_size (gdbarch, pseudo_regno),
@ -1205,7 +1205,7 @@ h8300_pseudo_register_read (struct gdbarch *gdbarch,
regno, E_EXR_REGNUM); regno, E_EXR_REGNUM);
} }
else else
return regcache_raw_read (regcache, regno, buf); return regcache->raw_read (regno, buf);
} }
static void static void

View file

@ -2754,7 +2754,7 @@ hppa_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
ULONGEST tmp; ULONGEST tmp;
enum register_status status; enum register_status status;
status = regcache_raw_read_unsigned (regcache, regnum, &tmp); status = regcache->raw_read (regnum, &tmp);
if (status == REG_VALID) if (status == REG_VALID)
{ {
if (regnum == HPPA_PCOQ_HEAD_REGNUM || regnum == HPPA_PCOQ_TAIL_REGNUM) if (regnum == HPPA_PCOQ_HEAD_REGNUM || regnum == HPPA_PCOQ_TAIL_REGNUM)

View file

@ -3256,7 +3256,7 @@ i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
int tos; int tos;
mmxreg = regnum - tdep->mm0_regnum; mmxreg = regnum - tdep->mm0_regnum;
regcache_raw_read_unsigned (regcache, I387_FSTAT_REGNUM (tdep), &fstat); regcache->raw_read (I387_FSTAT_REGNUM (tdep), &fstat);
tos = (fstat >> 11) & 0x7; tos = (fstat >> 11) & 0x7;
fpreg = (mmxreg + tos) % 8; fpreg = (mmxreg + tos) % 8;
@ -3282,7 +3282,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum); int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum);
/* Extract (always little endian). */ /* Extract (always little endian). */
status = regcache_raw_read (regcache, fpnum, raw_buf); status = regcache->raw_read (fpnum, raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));
@ -3297,8 +3297,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
regnum -= tdep->bnd0_regnum; regnum -= tdep->bnd0_regnum;
/* Extract (always little endian). Read lower 128bits. */ /* Extract (always little endian). Read lower 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (I387_BND0R_REGNUM (tdep) + regnum,
I387_BND0R_REGNUM (tdep) + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, 16); mark_value_bytes_unavailable (result_value, 0, 16);
@ -3321,9 +3320,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
regnum -= tdep->k0_regnum; regnum -= tdep->k0_regnum;
/* Extract (always little endian). */ /* Extract (always little endian). */
status = regcache_raw_read (regcache, status = regcache->raw_read (tdep->k0_regnum + regnum, raw_buf);
tdep->k0_regnum + regnum,
raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, 8); mark_value_bytes_unavailable (result_value, 0, 8);
else else
@ -3336,8 +3333,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
if (regnum < num_lower_zmm_regs) if (regnum < num_lower_zmm_regs)
{ {
/* Extract (always little endian). Read lower 128bits. */ /* Extract (always little endian). Read lower 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (I387_XMM0_REGNUM (tdep) + regnum,
I387_XMM0_REGNUM (tdep) + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, 16); mark_value_bytes_unavailable (result_value, 0, 16);
@ -3345,8 +3341,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
memcpy (buf, raw_buf, 16); memcpy (buf, raw_buf, 16);
/* Extract (always little endian). Read upper 128bits. */ /* Extract (always little endian). Read upper 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (tdep->ymm0h_regnum + regnum,
tdep->ymm0h_regnum + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 16, 16); mark_value_bytes_unavailable (result_value, 16, 16);
@ -3356,8 +3351,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
else else
{ {
/* Extract (always little endian). Read lower 128bits. */ /* Extract (always little endian). Read lower 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (I387_XMM16_REGNUM (tdep) + regnum
I387_XMM16_REGNUM (tdep) + regnum
- num_lower_zmm_regs, - num_lower_zmm_regs,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
@ -3366,8 +3360,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
memcpy (buf, raw_buf, 16); memcpy (buf, raw_buf, 16);
/* Extract (always little endian). Read upper 128bits. */ /* Extract (always little endian). Read upper 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (I387_YMM16H_REGNUM (tdep) + regnum
I387_YMM16H_REGNUM (tdep) + regnum
- num_lower_zmm_regs, - num_lower_zmm_regs,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
@ -3377,8 +3370,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
} }
/* Read upper 256bits. */ /* Read upper 256bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (tdep->zmm0h_regnum + regnum,
tdep->zmm0h_regnum + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 32, 32); mark_value_bytes_unavailable (result_value, 32, 32);
@ -3390,16 +3382,14 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
regnum -= tdep->ymm0_regnum; regnum -= tdep->ymm0_regnum;
/* Extract (always little endian). Read lower 128bits. */ /* Extract (always little endian). Read lower 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (I387_XMM0_REGNUM (tdep) + regnum,
I387_XMM0_REGNUM (tdep) + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, 16); mark_value_bytes_unavailable (result_value, 0, 16);
else else
memcpy (buf, raw_buf, 16); memcpy (buf, raw_buf, 16);
/* Read upper 128bits. */ /* Read upper 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (tdep->ymm0h_regnum + regnum,
tdep->ymm0h_regnum + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 16, 32); mark_value_bytes_unavailable (result_value, 16, 32);
@ -3410,16 +3400,14 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
{ {
regnum -= tdep->ymm16_regnum; regnum -= tdep->ymm16_regnum;
/* Extract (always little endian). Read lower 128bits. */ /* Extract (always little endian). Read lower 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (I387_XMM16_REGNUM (tdep) + regnum,
I387_XMM16_REGNUM (tdep) + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, 16); mark_value_bytes_unavailable (result_value, 0, 16);
else else
memcpy (buf, raw_buf, 16); memcpy (buf, raw_buf, 16);
/* Read upper 128bits. */ /* Read upper 128bits. */
status = regcache_raw_read (regcache, status = regcache->raw_read (tdep->ymm16h_regnum + regnum,
tdep->ymm16h_regnum + regnum,
raw_buf); raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 16, 16); mark_value_bytes_unavailable (result_value, 16, 16);
@ -3431,7 +3419,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
int gpnum = regnum - tdep->ax_regnum; int gpnum = regnum - tdep->ax_regnum;
/* Extract (always little endian). */ /* Extract (always little endian). */
status = regcache_raw_read (regcache, gpnum, raw_buf); status = regcache->raw_read (gpnum, raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));
@ -3444,7 +3432,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
/* Extract (always little endian). We read both lower and /* Extract (always little endian). We read both lower and
upper registers. */ upper registers. */
status = regcache_raw_read (regcache, gpnum % 4, raw_buf); status = regcache->raw_read (gpnum % 4, raw_buf);
if (status != REG_VALID) if (status != REG_VALID)
mark_value_bytes_unavailable (result_value, 0, mark_value_bytes_unavailable (result_value, 0,
TYPE_LENGTH (value_type (result_value))); TYPE_LENGTH (value_type (result_value)));

View file

@ -312,7 +312,7 @@ static m32c_write_reg_t m32c_r3r2r1r0_write;
static enum register_status static enum register_status
m32c_raw_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf) m32c_raw_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
{ {
return regcache_raw_read (cache, reg->num, buf); return cache->raw_read (reg->num, buf);
} }
@ -333,7 +333,8 @@ m32c_read_flg (struct regcache *cache)
{ {
struct gdbarch_tdep *tdep = gdbarch_tdep (cache->arch ()); struct gdbarch_tdep *tdep = gdbarch_tdep (cache->arch ());
ULONGEST flg; ULONGEST flg;
regcache_raw_read_unsigned (cache, tdep->flg->num, &flg);
cache->raw_read (tdep->flg->num, &flg);
return flg & 0xffff; return flg & 0xffff;
} }
@ -354,7 +355,7 @@ static enum register_status
m32c_banked_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf) m32c_banked_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
{ {
struct m32c_reg *bank_reg = m32c_banked_register (reg, cache); struct m32c_reg *bank_reg = m32c_banked_register (reg, cache);
return regcache_raw_read (cache, bank_reg->num, buf); return cache->raw_read (bank_reg->num, buf);
} }
@ -447,7 +448,7 @@ m32c_part_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
memset (buf, 0, TYPE_LENGTH (reg->type)); memset (buf, 0, TYPE_LENGTH (reg->type));
m32c_find_part (reg, &offset, &len); m32c_find_part (reg, &offset, &len);
return regcache_cooked_read_part (cache, reg->rx->num, offset, len, buf); return cache->cooked_read_part (reg->rx->num, offset, len, buf);
} }

View file

@ -1136,7 +1136,7 @@ mep_pseudo_cr32_read (struct gdbarch *gdbarch,
gdb_assert (TYPE_LENGTH (register_type (gdbarch, rawnum)) == sizeof (buf64)); gdb_assert (TYPE_LENGTH (register_type (gdbarch, rawnum)) == sizeof (buf64));
gdb_assert (TYPE_LENGTH (register_type (gdbarch, cookednum)) == 4); gdb_assert (TYPE_LENGTH (register_type (gdbarch, cookednum)) == 4);
status = regcache_raw_read (regcache, rawnum, buf64); status = regcache->raw_read (rawnum, buf64);
if (status == REG_VALID) if (status == REG_VALID)
{ {
/* Slow, but legible. */ /* Slow, but legible. */
@ -1153,7 +1153,7 @@ mep_pseudo_cr64_read (struct gdbarch *gdbarch,
int cookednum, int cookednum,
gdb_byte *buf) gdb_byte *buf)
{ {
return regcache_raw_read (regcache, mep_pseudo_to_raw[cookednum], buf); return regcache->raw_read (mep_pseudo_to_raw[cookednum], buf);
} }
@ -1165,7 +1165,7 @@ mep_pseudo_register_read (struct gdbarch *gdbarch,
{ {
if (IS_CSR_REGNUM (cookednum) if (IS_CSR_REGNUM (cookednum)
|| IS_CCR_REGNUM (cookednum)) || IS_CCR_REGNUM (cookednum))
return regcache_raw_read (regcache, mep_pseudo_to_raw[cookednum], buf); return regcache->raw_read (mep_pseudo_to_raw[cookednum], buf);
else if (IS_CR32_REGNUM (cookednum) else if (IS_CR32_REGNUM (cookednum)
|| IS_FP_CR32_REGNUM (cookednum)) || IS_FP_CR32_REGNUM (cookednum))
return mep_pseudo_cr32_read (gdbarch, regcache, cookednum, buf); return mep_pseudo_cr32_read (gdbarch, regcache, cookednum, buf);

View file

@ -744,19 +744,19 @@ mips_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
gdb_assert (cookednum >= gdbarch_num_regs (gdbarch) gdb_assert (cookednum >= gdbarch_num_regs (gdbarch)
&& cookednum < 2 * gdbarch_num_regs (gdbarch)); && cookednum < 2 * gdbarch_num_regs (gdbarch));
if (register_size (gdbarch, rawnum) == register_size (gdbarch, cookednum)) if (register_size (gdbarch, rawnum) == register_size (gdbarch, cookednum))
return regcache_raw_read (regcache, rawnum, buf); return regcache->raw_read (rawnum, buf);
else if (register_size (gdbarch, rawnum) > else if (register_size (gdbarch, rawnum) >
register_size (gdbarch, cookednum)) register_size (gdbarch, cookednum))
{ {
if (gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p) if (gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p)
return regcache_raw_read_part (regcache, rawnum, 0, 4, buf); return regcache->raw_read_part (rawnum, 0, 4, buf);
else else
{ {
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
LONGEST regval; LONGEST regval;
enum register_status status; enum register_status status;
status = regcache_raw_read_signed (regcache, rawnum, &regval); status = regcache->raw_read (rawnum, &regval);
if (status == REG_VALID) if (status == REG_VALID)
store_signed_integer (buf, 4, byte_order, regval); store_signed_integer (buf, 4, byte_order, regval);
return status; return status;

View file

@ -229,7 +229,7 @@ msp430_pseudo_register_read (struct gdbarch *gdbarch,
int regsize = register_size (gdbarch, regnum); int regsize = register_size (gdbarch, regnum);
int raw_regnum = regnum - MSP430_NUM_REGS; int raw_regnum = regnum - MSP430_NUM_REGS;
status = regcache_raw_read_unsigned (regcache, raw_regnum, &val); status = regcache->raw_read (raw_regnum, &val);
if (status == REG_VALID) if (status == REG_VALID)
store_unsigned_integer (buffer, regsize, byte_order, val); store_unsigned_integer (buffer, regsize, byte_order, val);

View file

@ -462,7 +462,7 @@ nds32_pseudo_register_read (struct gdbarch *gdbarch,
offset = (regnum & 1) ? 0 : 4; offset = (regnum & 1) ? 0 : 4;
fdr_regnum = NDS32_FD0_REGNUM + (regnum >> 1); fdr_regnum = NDS32_FD0_REGNUM + (regnum >> 1);
status = regcache_raw_read (regcache, fdr_regnum, reg_buf); status = regcache->raw_read (fdr_regnum, reg_buf);
if (status == REG_VALID) if (status == REG_VALID)
memcpy (buf, reg_buf + offset, 4); memcpy (buf, reg_buf + offset, 4);

View file

@ -650,68 +650,67 @@ rl78_pseudo_register_read (struct gdbarch *gdbarch,
int raw_regnum = RL78_RAW_BANK0_R0_REGNUM int raw_regnum = RL78_RAW_BANK0_R0_REGNUM
+ (reg - RL78_BANK0_R0_REGNUM); + (reg - RL78_BANK0_R0_REGNUM);
status = regcache_raw_read (regcache, raw_regnum, buffer); status = regcache->raw_read (raw_regnum, buffer);
} }
else if (RL78_BANK0_RP0_REGNUM <= reg && reg <= RL78_BANK3_RP3_REGNUM) else if (RL78_BANK0_RP0_REGNUM <= reg && reg <= RL78_BANK3_RP3_REGNUM)
{ {
int raw_regnum = 2 * (reg - RL78_BANK0_RP0_REGNUM) int raw_regnum = 2 * (reg - RL78_BANK0_RP0_REGNUM)
+ RL78_RAW_BANK0_R0_REGNUM; + RL78_RAW_BANK0_R0_REGNUM;
status = regcache_raw_read (regcache, raw_regnum, buffer); status = regcache->raw_read (raw_regnum, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, raw_regnum + 1, buffer + 1); status = regcache->raw_read (raw_regnum + 1, buffer + 1);
} }
else if (RL78_BANK0_RP0_PTR_REGNUM <= reg && reg <= RL78_BANK3_RP3_PTR_REGNUM) else if (RL78_BANK0_RP0_PTR_REGNUM <= reg && reg <= RL78_BANK3_RP3_PTR_REGNUM)
{ {
int raw_regnum = 2 * (reg - RL78_BANK0_RP0_PTR_REGNUM) int raw_regnum = 2 * (reg - RL78_BANK0_RP0_PTR_REGNUM)
+ RL78_RAW_BANK0_R0_REGNUM; + RL78_RAW_BANK0_R0_REGNUM;
status = regcache_raw_read (regcache, raw_regnum, buffer); status = regcache->raw_read (raw_regnum, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, raw_regnum + 1, buffer + 1); status = regcache->raw_read (raw_regnum + 1, buffer + 1);
} }
else if (reg == RL78_SP_REGNUM) else if (reg == RL78_SP_REGNUM)
{ {
status = regcache_raw_read (regcache, RL78_SPL_REGNUM, buffer); status = regcache->raw_read (RL78_SPL_REGNUM, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, RL78_SPH_REGNUM, buffer + 1); status = regcache->raw_read (RL78_SPH_REGNUM, buffer + 1);
} }
else if (reg == RL78_PC_REGNUM) else if (reg == RL78_PC_REGNUM)
{ {
gdb_byte rawbuf[4]; gdb_byte rawbuf[4];
status = regcache_raw_read (regcache, RL78_RAW_PC_REGNUM, rawbuf); status = regcache->raw_read (RL78_RAW_PC_REGNUM, rawbuf);
memcpy (buffer, rawbuf, 3); memcpy (buffer, rawbuf, 3);
} }
else if (RL78_X_REGNUM <= reg && reg <= RL78_H_REGNUM) else if (RL78_X_REGNUM <= reg && reg <= RL78_H_REGNUM)
{ {
ULONGEST psw; ULONGEST psw;
status = regcache_raw_read_unsigned (regcache, RL78_PSW_REGNUM, &psw); status = regcache->raw_read (RL78_PSW_REGNUM, &psw);
if (status == REG_VALID) if (status == REG_VALID)
{ {
/* RSB0 is at bit 3; RSBS1 is at bit 5. */ /* RSB0 is at bit 3; RSBS1 is at bit 5. */
int bank = ((psw >> 3) & 1) | ((psw >> 4) & 1); int bank = ((psw >> 3) & 1) | ((psw >> 4) & 1);
int raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK int raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK
+ (reg - RL78_X_REGNUM); + (reg - RL78_X_REGNUM);
status = regcache_raw_read (regcache, raw_regnum, buffer); status = regcache->raw_read (raw_regnum, buffer);
} }
} }
else if (RL78_AX_REGNUM <= reg && reg <= RL78_HL_REGNUM) else if (RL78_AX_REGNUM <= reg && reg <= RL78_HL_REGNUM)
{ {
ULONGEST psw; ULONGEST psw;
status = regcache_raw_read_unsigned (regcache, RL78_PSW_REGNUM, &psw); status = regcache->raw_read (RL78_PSW_REGNUM, &psw);
if (status == REG_VALID) if (status == REG_VALID)
{ {
/* RSB0 is at bit 3; RSBS1 is at bit 5. */ /* RSB0 is at bit 3; RSBS1 is at bit 5. */
int bank = ((psw >> 3) & 1) | ((psw >> 4) & 1); int bank = ((psw >> 3) & 1) | ((psw >> 4) & 1);
int raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK int raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK
+ 2 * (reg - RL78_AX_REGNUM); + 2 * (reg - RL78_AX_REGNUM);
status = regcache_raw_read (regcache, raw_regnum, buffer); status = regcache->raw_read (raw_regnum, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, raw_regnum + 1, status = regcache->raw_read (raw_regnum + 1, buffer + 1);
buffer + 1);
} }
} }
else else

View file

@ -2746,18 +2746,18 @@ dfp_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{ {
/* Read two FP registers to form a whole dl register. */ /* Read two FP registers to form a whole dl register. */
status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum + status = regcache->raw_read (tdep->ppc_fp0_regnum +
2 * reg_index, buffer); 2 * reg_index, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum + status = regcache->raw_read (tdep->ppc_fp0_regnum +
2 * reg_index + 1, buffer + 8); 2 * reg_index + 1, buffer + 8);
} }
else else
{ {
status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum + status = regcache->raw_read (tdep->ppc_fp0_regnum +
2 * reg_index + 1, buffer); 2 * reg_index + 1, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum + status = regcache->raw_read (tdep->ppc_fp0_regnum +
2 * reg_index, buffer + 8); 2 * reg_index, buffer + 8);
} }
@ -2801,24 +2801,24 @@ vsx_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
/* Read the portion that overlaps the VMX registers. */ /* Read the portion that overlaps the VMX registers. */
if (reg_index > 31) if (reg_index > 31)
status = regcache_raw_read (regcache, tdep->ppc_vr0_regnum + status = regcache->raw_read (tdep->ppc_vr0_regnum +
reg_index - 32, buffer); reg_index - 32, buffer);
else else
/* Read the portion that overlaps the FPR registers. */ /* Read the portion that overlaps the FPR registers. */
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{ {
status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum + status = regcache->raw_read (tdep->ppc_fp0_regnum +
reg_index, buffer); reg_index, buffer);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, tdep->ppc_vsr0_upper_regnum + status = regcache->raw_read (tdep->ppc_vsr0_upper_regnum +
reg_index, buffer + 8); reg_index, buffer + 8);
} }
else else
{ {
status = regcache_raw_read (regcache, tdep->ppc_fp0_regnum + status = regcache->raw_read (tdep->ppc_fp0_regnum +
reg_index, buffer + 8); reg_index, buffer + 8);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, tdep->ppc_vsr0_upper_regnum + status = regcache->raw_read (tdep->ppc_vsr0_upper_regnum +
reg_index, buffer); reg_index, buffer);
} }

View file

@ -399,7 +399,7 @@ s390_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{ {
enum register_status status; enum register_status status;
status = regcache_raw_read_unsigned (regcache, S390_PSWA_REGNUM, &val); status = regcache->raw_read (S390_PSWA_REGNUM, &val);
if (status == REG_VALID) if (status == REG_VALID)
{ {
if (register_size (gdbarch, S390_PSWA_REGNUM) == 4) if (register_size (gdbarch, S390_PSWA_REGNUM) == 4)
@ -413,7 +413,7 @@ s390_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{ {
enum register_status status; enum register_status status;
status = regcache_raw_read_unsigned (regcache, S390_PSWM_REGNUM, &val); status = regcache->raw_read (S390_PSWM_REGNUM, &val);
if (status == REG_VALID) if (status == REG_VALID)
{ {
if (register_size (gdbarch, S390_PSWA_REGNUM) == 4) if (register_size (gdbarch, S390_PSWA_REGNUM) == 4)
@ -432,9 +432,9 @@ s390_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
regnum -= tdep->gpr_full_regnum; regnum -= tdep->gpr_full_regnum;
status = regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + regnum, &val); status = regcache->raw_read (S390_R0_REGNUM + regnum, &val);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read_unsigned (regcache, S390_R0_UPPER_REGNUM + regnum, status = regcache->raw_read (S390_R0_UPPER_REGNUM + regnum,
&val_upper); &val_upper);
if (status == REG_VALID) if (status == REG_VALID)
{ {
@ -450,10 +450,9 @@ s390_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
regnum -= tdep->v0_full_regnum; regnum -= tdep->v0_full_regnum;
status = regcache_raw_read (regcache, S390_F0_REGNUM + regnum, buf); status = regcache->raw_read (S390_F0_REGNUM + regnum, buf);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, status = regcache->raw_read (S390_V0_LOWER_REGNUM + regnum, buf + 8);
S390_V0_LOWER_REGNUM + regnum, buf + 8);
return status; return status;
} }

View file

@ -1640,7 +1640,7 @@ pseudo_register_read_portions (struct gdbarch *gdbarch,
gdb_byte *b; gdb_byte *b;
b = buffer + register_size (gdbarch, base_regnum) * portion; b = buffer + register_size (gdbarch, base_regnum) * portion;
status = regcache_raw_read (regcache, base_regnum + portion, b); status = regcache->raw_read (base_regnum + portion, b);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
} }
@ -1656,7 +1656,7 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
enum register_status status; enum register_status status;
if (reg_nr == PSEUDO_BANK_REGNUM) if (reg_nr == PSEUDO_BANK_REGNUM)
return regcache_raw_read (regcache, BANK_REGNUM, buffer); return regcache->raw_read (BANK_REGNUM, buffer);
else if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM) else if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM)
{ {
/* Enough space for two float registers. */ /* Enough space for two float registers. */

View file

@ -1516,7 +1516,7 @@ pseudo_register_read_portions (struct gdbarch *gdbarch,
gdb_byte *b; gdb_byte *b;
b = buffer + register_size (gdbarch, base_regnum) * portion; b = buffer + register_size (gdbarch, base_regnum) * portion;
status = regcache_raw_read (regcache, base_regnum + portion, b); status = regcache->raw_read (base_regnum + portion, b);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
} }
@ -1587,7 +1587,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
base_regnum = sh64_compact_reg_base_num (gdbarch, reg_nr); base_regnum = sh64_compact_reg_base_num (gdbarch, reg_nr);
/* Build the value in the provided buffer. */ /* Build the value in the provided buffer. */
status = regcache_raw_read (regcache, base_regnum, temp_buffer); status = regcache->raw_read (base_regnum, temp_buffer);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
@ -1605,7 +1605,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
/* Build the value in the provided buffer. */ /* Build the value in the provided buffer. */
/* Floating point registers map 1-1 to the media fp regs, /* Floating point registers map 1-1 to the media fp regs,
they have the same size and endianness. */ they have the same size and endianness. */
return regcache_raw_read (regcache, base_regnum, buffer); return regcache->raw_read (base_regnum, buffer);
} }
else if (reg_nr >= DR0_C_REGNUM else if (reg_nr >= DR0_C_REGNUM
@ -1692,7 +1692,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
/* FPUL_C register is floating point register 32, /* FPUL_C register is floating point register 32,
same size, same endianness. */ same size, same endianness. */
return regcache_raw_read (regcache, base_regnum, buffer); return regcache->raw_read (base_regnum, buffer);
} }
else else
gdb_assert_not_reached ("invalid pseudo register number"); gdb_assert_not_reached ("invalid pseudo register number");

View file

@ -512,9 +512,9 @@ sparc32_pseudo_register_read (struct gdbarch *gdbarch,
gdb_assert (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM); gdb_assert (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM);
regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC32_D0_REGNUM); regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC32_D0_REGNUM);
status = regcache_raw_read (regcache, regnum, buf); status = regcache->raw_read (regnum, buf);
if (status == REG_VALID) if (status == REG_VALID)
status = regcache_raw_read (regcache, regnum + 1, buf + 4); status = regcache->raw_read (regnum + 1, buf + 4);
return status; return status;
} }

View file

@ -910,27 +910,27 @@ sparc64_pseudo_register_read (struct gdbarch *gdbarch,
if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D30_REGNUM) if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D30_REGNUM)
{ {
regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC64_D0_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) if (status == REG_VALID)
status = regcache_raw_read (regcache, regnum + 1, buf + 4); status = regcache->raw_read (regnum + 1, buf + 4);
return status; return status;
} }
else if (regnum >= SPARC64_D32_REGNUM && regnum <= SPARC64_D62_REGNUM) else if (regnum >= SPARC64_D32_REGNUM && regnum <= SPARC64_D62_REGNUM)
{ {
regnum = SPARC64_F32_REGNUM + (regnum - SPARC64_D32_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) else if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q28_REGNUM)
{ {
regnum = SPARC_F0_REGNUM + 4 * (regnum - SPARC64_Q0_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) 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) 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) if (status == REG_VALID)
status = regcache_raw_read (regcache, regnum + 3, buf + 12); status = regcache->raw_read (regnum + 3, buf + 12);
return status; return status;
} }
@ -938,9 +938,9 @@ sparc64_pseudo_register_read (struct gdbarch *gdbarch,
{ {
regnum = SPARC64_F32_REGNUM + 2 * (regnum - SPARC64_Q32_REGNUM); 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) if (status == REG_VALID)
status = regcache_raw_read (regcache, regnum + 1, buf + 8); status = regcache->raw_read (regnum + 1, buf + 8);
return status; return status;
} }
@ -951,7 +951,7 @@ sparc64_pseudo_register_read (struct gdbarch *gdbarch,
{ {
ULONGEST state; ULONGEST state;
status = regcache_raw_read_unsigned (regcache, SPARC64_STATE_REGNUM, &state); status = regcache->raw_read (SPARC64_STATE_REGNUM, &state);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;

View file

@ -193,7 +193,7 @@ spu_pseudo_register_read_spu (struct regcache *regcache, const char *regname,
ULONGEST id; ULONGEST id;
ULONGEST ul; ULONGEST ul;
status = regcache_raw_read_unsigned (regcache, SPU_ID_REGNUM, &id); status = regcache->raw_read (SPU_ID_REGNUM, &id);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
xsnprintf (annex, sizeof annex, "%d/%s", (int) id, regname); xsnprintf (annex, sizeof annex, "%d/%s", (int) id, regname);
@ -218,14 +218,14 @@ spu_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
switch (regnum) switch (regnum)
{ {
case SPU_SP_REGNUM: case SPU_SP_REGNUM:
status = regcache_raw_read (regcache, SPU_RAW_SP_REGNUM, reg); status = regcache->raw_read (SPU_RAW_SP_REGNUM, reg);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
memcpy (buf, reg, 4); memcpy (buf, reg, 4);
return status; return status;
case SPU_FPSCR_REGNUM: case SPU_FPSCR_REGNUM:
status = regcache_raw_read_unsigned (regcache, SPU_ID_REGNUM, &id); status = regcache->raw_read (SPU_ID_REGNUM, &id);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
xsnprintf (annex, sizeof annex, "%d/fpcr", (int) id); xsnprintf (annex, sizeof annex, "%d/fpcr", (int) id);

View file

@ -562,8 +562,7 @@ xtensa_pseudo_register_read (struct gdbarch *gdbarch,
ULONGEST value; ULONGEST value;
enum register_status status; enum register_status status;
status = regcache_raw_read_unsigned (regcache, status = regcache->raw_read (gdbarch_tdep (gdbarch)->wb_regnum,
gdbarch_tdep (gdbarch)->wb_regnum,
&value); &value);
if (status != REG_VALID) if (status != REG_VALID)
return status; return status;
@ -572,7 +571,7 @@ xtensa_pseudo_register_read (struct gdbarch *gdbarch,
/* We can always read non-pseudo registers. */ /* We can always read non-pseudo registers. */
if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch)) if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
return regcache_raw_read (regcache, regnum, buffer); return regcache->raw_read (regnum, buffer);
/* We have to find out how to deal with priveleged registers. /* We have to find out how to deal with priveleged registers.
Let's treat them as pseudo-registers, but we cannot read/write them. */ Let's treat them as pseudo-registers, but we cannot read/write them. */
@ -629,7 +628,7 @@ xtensa_pseudo_register_read (struct gdbarch *gdbarch,
return xtensa_register_read_masked (regcache, reg, buffer); return xtensa_register_read_masked (regcache, reg, buffer);
/* Assume that we can read the register. */ /* Assume that we can read the register. */
return regcache_raw_read (regcache, regnum, buffer); return regcache->raw_read (regnum, buffer);
} }
else else
internal_error (__FILE__, __LINE__, internal_error (__FILE__, __LINE__,