diff options
-rw-r--r-- | gdb/ChangeLog | 22 | ||||
-rw-r--r-- | gdb/aarch64-tdep.c | 10 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 9 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 6 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 2 | ||||
-rw-r--r-- | gdb/bfin-tdep.c | 2 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 6 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 4 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 66 | ||||
-rw-r--r-- | gdb/m32c-tdep.c | 9 | ||||
-rw-r--r-- | gdb/mep-tdep.c | 6 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 6 | ||||
-rw-r--r-- | gdb/msp430-tdep.c | 2 | ||||
-rw-r--r-- | gdb/nds32-tdep.c | 2 | ||||
-rw-r--r-- | gdb/rl78-tdep.c | 27 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 36 | ||||
-rw-r--r-- | gdb/s390-linux-tdep.c | 15 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 4 | ||||
-rw-r--r-- | gdb/sh64-tdep.c | 8 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 4 | ||||
-rw-r--r-- | gdb/sparc64-tdep.c | 20 | ||||
-rw-r--r-- | gdb/spu-tdep.c | 6 | ||||
-rw-r--r-- | gdb/xtensa-tdep.c | 9 |
24 files changed, 145 insertions, 138 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ea53da6..cab98ed 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,27 @@ 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> + * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o. * configure.tgt: Remove target mt. * mt-tdep.c: Remove. diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index e4cd3b5..6b59f03 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2245,7 +2245,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch, unsigned v_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) mark_value_bytes_unavailable (result_value, 0, TYPE_LENGTH (value_type (result_value))); @@ -2260,7 +2260,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch, unsigned v_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) mark_value_bytes_unavailable (result_value, 0, TYPE_LENGTH (value_type (result_value))); @@ -2275,7 +2275,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch, unsigned v_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) mark_value_bytes_unavailable (result_value, 0, TYPE_LENGTH (value_type (result_value))); @@ -2290,7 +2290,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch, unsigned v_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) mark_value_bytes_unavailable (result_value, 0, TYPE_LENGTH (value_type (result_value))); @@ -2305,7 +2305,7 @@ aarch64_pseudo_read_value (struct gdbarch *gdbarch, unsigned v_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) mark_value_bytes_unavailable (result_value, 0, TYPE_LENGTH (value_type (result_value))); diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 7b2851f..b589d93 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -369,9 +369,8 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch, if (gpnum >= AMD64_NUM_LOWER_BYTE_REGS) { /* Special handling for AH, BH, CH, DH. */ - status = regcache_raw_read (regcache, - gpnum - AMD64_NUM_LOWER_BYTE_REGS, - raw_buf); + status = regcache->raw_read (gpnum - AMD64_NUM_LOWER_BYTE_REGS, + raw_buf); if (status == REG_VALID) memcpy (buf, raw_buf + 1, 1); else @@ -380,7 +379,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch, } else { - status = regcache_raw_read (regcache, gpnum, raw_buf); + status = regcache->raw_read (gpnum, raw_buf); if (status == REG_VALID) memcpy (buf, raw_buf, 1); else @@ -392,7 +391,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch, { int gpnum = regnum - tdep->eax_regnum; /* Extract (always little endian). */ - status = regcache_raw_read (regcache, gpnum, raw_buf); + status = regcache->raw_read (gpnum, raw_buf); if (status == REG_VALID) memcpy (buf, raw_buf, 4); else diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index bc83326..2e43489 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -8696,13 +8696,13 @@ arm_neon_quad_read (struct gdbarch *gdbarch, struct regcache *regcache, else offset = 0; - status = regcache_raw_read (regcache, double_regnum, reg_buf); + status = regcache->raw_read (double_regnum, reg_buf); if (status != REG_VALID) return status; memcpy (buf + offset, reg_buf, 8); 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) return status; 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, strlen (name_buf)); - status = regcache_raw_read (regcache, double_regnum, reg_buf); + status = regcache->raw_read (double_regnum, reg_buf); if (status == REG_VALID) memcpy (buf, reg_buf + offset, 4); return status; diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index aa65a76..177717f 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -391,7 +391,7 @@ avr_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, switch (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) return status; val >>= 1; diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index d87fd4d..db8de82 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -699,7 +699,7 @@ bfin_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, _("invalid register number %d"), regnum); /* 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) { buffer[1] = buffer[2] = buffer[3] = 0; diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 4bb94b0..b6906fa 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -302,9 +302,9 @@ frv_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, if (reg == iacc0_regnum) { - status = regcache_raw_read (regcache, iacc0h_regnum, buffer); + status = regcache->raw_read (iacc0h_regnum, buffer); 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) { @@ -315,7 +315,7 @@ frv_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int byte_num = (reg - accg0_regnum) % 4; gdb_byte buf[4]; - status = regcache_raw_read (regcache, raw_regnum, buf); + status = regcache->raw_read (raw_regnum, buf); if (status == REG_VALID) { memset (buffer, 0, 4); diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 809a647..bf5b9ec 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1167,7 +1167,7 @@ pseudo_from_raw_register (struct gdbarch *gdbarch, struct regcache *regcache, enum register_status status; ULONGEST val; - status = regcache_raw_read_unsigned (regcache, raw_regno, &val); + status = regcache->raw_read (raw_regno, &val); if (status == REG_VALID) store_unsigned_integer (buf, register_size (gdbarch, pseudo_regno), @@ -1205,7 +1205,7 @@ h8300_pseudo_register_read (struct gdbarch *gdbarch, regno, E_EXR_REGNUM); } else - return regcache_raw_read (regcache, regno, buf); + return regcache->raw_read (regno, buf); } static void diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 513f0e0..814b8a8 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2754,7 +2754,7 @@ hppa_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, ULONGEST tmp; enum register_status status; - status = regcache_raw_read_unsigned (regcache, regnum, &tmp); + status = regcache->raw_read (regnum, &tmp); if (status == REG_VALID) { if (regnum == HPPA_PCOQ_HEAD_REGNUM || regnum == HPPA_PCOQ_TAIL_REGNUM) diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 9ce329e..cd56642 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3256,7 +3256,7 @@ i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum) int tos; 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; 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); /* Extract (always little endian). */ - status = regcache_raw_read (regcache, fpnum, raw_buf); + status = regcache->raw_read (fpnum, raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, TYPE_LENGTH (value_type (result_value))); @@ -3297,9 +3297,8 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, regnum -= tdep->bnd0_regnum; /* Extract (always little endian). Read lower 128bits. */ - status = regcache_raw_read (regcache, - I387_BND0R_REGNUM (tdep) + regnum, - raw_buf); + status = regcache->raw_read (I387_BND0R_REGNUM (tdep) + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, 16); else @@ -3321,9 +3320,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, regnum -= tdep->k0_regnum; /* Extract (always little endian). */ - status = regcache_raw_read (regcache, - tdep->k0_regnum + regnum, - raw_buf); + status = regcache->raw_read (tdep->k0_regnum + regnum, raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, 8); else @@ -3336,18 +3333,16 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, if (regnum < num_lower_zmm_regs) { /* Extract (always little endian). Read lower 128bits. */ - status = regcache_raw_read (regcache, - I387_XMM0_REGNUM (tdep) + regnum, - raw_buf); + status = regcache->raw_read (I387_XMM0_REGNUM (tdep) + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, 16); else memcpy (buf, raw_buf, 16); /* Extract (always little endian). Read upper 128bits. */ - status = regcache_raw_read (regcache, - tdep->ymm0h_regnum + regnum, - raw_buf); + status = regcache->raw_read (tdep->ymm0h_regnum + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 16, 16); else @@ -3356,20 +3351,18 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, else { /* Extract (always little endian). Read lower 128bits. */ - status = regcache_raw_read (regcache, - I387_XMM16_REGNUM (tdep) + regnum - - num_lower_zmm_regs, - raw_buf); + status = regcache->raw_read (I387_XMM16_REGNUM (tdep) + regnum + - num_lower_zmm_regs, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, 16); else memcpy (buf, raw_buf, 16); /* Extract (always little endian). Read upper 128bits. */ - status = regcache_raw_read (regcache, - I387_YMM16H_REGNUM (tdep) + regnum - - num_lower_zmm_regs, - raw_buf); + status = regcache->raw_read (I387_YMM16H_REGNUM (tdep) + regnum + - num_lower_zmm_regs, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 16, 16); else @@ -3377,9 +3370,8 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, } /* Read upper 256bits. */ - status = regcache_raw_read (regcache, - tdep->zmm0h_regnum + regnum, - raw_buf); + status = regcache->raw_read (tdep->zmm0h_regnum + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 32, 32); else @@ -3390,17 +3382,15 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, regnum -= tdep->ymm0_regnum; /* Extract (always little endian). Read lower 128bits. */ - status = regcache_raw_read (regcache, - I387_XMM0_REGNUM (tdep) + regnum, - raw_buf); + status = regcache->raw_read (I387_XMM0_REGNUM (tdep) + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, 16); else memcpy (buf, raw_buf, 16); /* Read upper 128bits. */ - status = regcache_raw_read (regcache, - tdep->ymm0h_regnum + regnum, - raw_buf); + status = regcache->raw_read (tdep->ymm0h_regnum + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 16, 32); else @@ -3410,17 +3400,15 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, { regnum -= tdep->ymm16_regnum; /* Extract (always little endian). Read lower 128bits. */ - status = regcache_raw_read (regcache, - I387_XMM16_REGNUM (tdep) + regnum, - raw_buf); + status = regcache->raw_read (I387_XMM16_REGNUM (tdep) + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, 16); else memcpy (buf, raw_buf, 16); /* Read upper 128bits. */ - status = regcache_raw_read (regcache, - tdep->ymm16h_regnum + regnum, - raw_buf); + status = regcache->raw_read (tdep->ymm16h_regnum + regnum, + raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 16, 16); else @@ -3431,7 +3419,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, int gpnum = regnum - tdep->ax_regnum; /* Extract (always little endian). */ - status = regcache_raw_read (regcache, gpnum, raw_buf); + status = regcache->raw_read (gpnum, raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, 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 upper registers. */ - status = regcache_raw_read (regcache, gpnum % 4, raw_buf); + status = regcache->raw_read (gpnum % 4, raw_buf); if (status != REG_VALID) mark_value_bytes_unavailable (result_value, 0, TYPE_LENGTH (value_type (result_value))); diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 14bd87f..fd8ba47 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -312,7 +312,7 @@ static m32c_write_reg_t m32c_r3r2r1r0_write; static enum register_status 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 ()); ULONGEST flg; - regcache_raw_read_unsigned (cache, tdep->flg->num, &flg); + + cache->raw_read (tdep->flg->num, &flg); return flg & 0xffff; } @@ -354,7 +355,7 @@ static enum register_status m32c_banked_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf) { 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)); 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); } diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index ecfd4f3..75eca6e 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -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, cookednum)) == 4); - status = regcache_raw_read (regcache, rawnum, buf64); + status = regcache->raw_read (rawnum, buf64); if (status == REG_VALID) { /* Slow, but legible. */ @@ -1153,7 +1153,7 @@ mep_pseudo_cr64_read (struct gdbarch *gdbarch, int cookednum, 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) || 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) || IS_FP_CR32_REGNUM (cookednum)) return mep_pseudo_cr32_read (gdbarch, regcache, cookednum, buf); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 981959a..6b78093 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -744,19 +744,19 @@ mips_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, gdb_assert (cookednum >= gdbarch_num_regs (gdbarch) && cookednum < 2 * gdbarch_num_regs (gdbarch)); 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) > register_size (gdbarch, cookednum)) { 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 { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); LONGEST regval; enum register_status status; - status = regcache_raw_read_signed (regcache, rawnum, ®val); + status = regcache->raw_read (rawnum, ®val); if (status == REG_VALID) store_signed_integer (buf, 4, byte_order, regval); return status; diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index c7c3ccb..4ae71f7 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -229,7 +229,7 @@ msp430_pseudo_register_read (struct gdbarch *gdbarch, int regsize = register_size (gdbarch, regnum); 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) store_unsigned_integer (buffer, regsize, byte_order, val); diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c index 5edaab3..73a71b9 100644 --- a/gdb/nds32-tdep.c +++ b/gdb/nds32-tdep.c @@ -462,7 +462,7 @@ nds32_pseudo_register_read (struct gdbarch *gdbarch, offset = (regnum & 1) ? 0 : 4; 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) memcpy (buf, reg_buf + offset, 4); diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c index 3db72a1..55653db 100644 --- a/gdb/rl78-tdep.c +++ b/gdb/rl78-tdep.c @@ -650,68 +650,67 @@ rl78_pseudo_register_read (struct gdbarch *gdbarch, int raw_regnum = RL78_RAW_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) { int raw_regnum = 2 * (reg - RL78_BANK0_RP0_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) - 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) { int raw_regnum = 2 * (reg - RL78_BANK0_RP0_PTR_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) - 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) { - status = regcache_raw_read (regcache, RL78_SPL_REGNUM, buffer); + status = regcache->raw_read (RL78_SPL_REGNUM, buffer); 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) { 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); } else if (RL78_X_REGNUM <= reg && reg <= RL78_H_REGNUM) { ULONGEST psw; - status = regcache_raw_read_unsigned (regcache, RL78_PSW_REGNUM, &psw); + status = regcache->raw_read (RL78_PSW_REGNUM, &psw); if (status == REG_VALID) { /* RSB0 is at bit 3; RSBS1 is at bit 5. */ int bank = ((psw >> 3) & 1) | ((psw >> 4) & 1); int raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK + (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) { ULONGEST psw; - status = regcache_raw_read_unsigned (regcache, RL78_PSW_REGNUM, &psw); + status = regcache->raw_read (RL78_PSW_REGNUM, &psw); if (status == REG_VALID) { /* RSB0 is at bit 3; RSBS1 is at bit 5. */ int bank = ((psw >> 3) & 1) | ((psw >> 4) & 1); int raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK + 2 * (reg - RL78_AX_REGNUM); - status = regcache_raw_read (regcache, raw_regnum, buffer); + status = regcache->raw_read (raw_regnum, buffer); if (status == REG_VALID) - status = regcache_raw_read (regcache, raw_regnum + 1, - buffer + 1); + status = regcache->raw_read (raw_regnum + 1, buffer + 1); } } else 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; diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index bdde5c3..b120d24 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -399,7 +399,7 @@ s390_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, { 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 (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; - status = regcache_raw_read_unsigned (regcache, S390_PSWM_REGNUM, &val); + status = regcache->raw_read (S390_PSWM_REGNUM, &val); if (status == REG_VALID) { if (register_size (gdbarch, S390_PSWA_REGNUM) == 4) @@ -432,10 +432,10 @@ s390_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, 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) - status = regcache_raw_read_unsigned (regcache, S390_R0_UPPER_REGNUM + regnum, - &val_upper); + status = regcache->raw_read (S390_R0_UPPER_REGNUM + regnum, + &val_upper); if (status == REG_VALID) { val |= val_upper << 32; @@ -450,10 +450,9 @@ s390_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, 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) - status = regcache_raw_read (regcache, - S390_V0_LOWER_REGNUM + regnum, buf + 8); + status = regcache->raw_read (S390_V0_LOWER_REGNUM + regnum, buf + 8); return status; } diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index fbc5c9f..a82c5b3 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1640,7 +1640,7 @@ pseudo_register_read_portions (struct gdbarch *gdbarch, gdb_byte *b; 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) return status; } @@ -1656,7 +1656,7 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, enum register_status status; 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) { /* Enough space for two float registers. */ diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index ad533c9..5da517a 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -1516,7 +1516,7 @@ pseudo_register_read_portions (struct gdbarch *gdbarch, gdb_byte *b; 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) 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); /* 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) return status; 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. */ /* Floating point registers map 1-1 to the media fp regs, 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 @@ -1692,7 +1692,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, /* FPUL_C register is floating point register 32, same size, same endianness. */ - return regcache_raw_read (regcache, base_regnum, buffer); + return regcache->raw_read (base_regnum, buffer); } else gdb_assert_not_reached ("invalid pseudo register number"); diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 12fd5b9..1ce7ee0 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -512,9 +512,9 @@ sparc32_pseudo_register_read (struct gdbarch *gdbarch, gdb_assert (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_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) - status = regcache_raw_read (regcache, regnum + 1, buf + 4); + status = regcache->raw_read (regnum + 1, buf + 4); return status; } diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 7400c24..67103cc 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -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; diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index b82bb0e..f2f4f65 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -193,7 +193,7 @@ spu_pseudo_register_read_spu (struct regcache *regcache, const char *regname, ULONGEST id; ULONGEST ul; - status = regcache_raw_read_unsigned (regcache, SPU_ID_REGNUM, &id); + status = regcache->raw_read (SPU_ID_REGNUM, &id); if (status != REG_VALID) return status; 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) { 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) return status; memcpy (buf, reg, 4); return status; 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) return status; xsnprintf (annex, sizeof annex, "%d/fpcr", (int) id); diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index e09592a..7d7d2b1 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -562,9 +562,8 @@ xtensa_pseudo_register_read (struct gdbarch *gdbarch, ULONGEST value; enum register_status status; - status = regcache_raw_read_unsigned (regcache, - gdbarch_tdep (gdbarch)->wb_regnum, - &value); + status = regcache->raw_read (gdbarch_tdep (gdbarch)->wb_regnum, + &value); if (status != REG_VALID) return status; regnum = arreg_number (gdbarch, regnum, value); @@ -572,7 +571,7 @@ xtensa_pseudo_register_read (struct gdbarch *gdbarch, /* We can always read non-pseudo registers. */ 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. 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); /* Assume that we can read the register. */ - return regcache_raw_read (regcache, regnum, buffer); + return regcache->raw_read (regnum, buffer); } else internal_error (__FILE__, __LINE__, |