[RFC 08/13] [gdb/build] Deprecate deprecated regcache::raw_write
Tom de Vries
tdevries@suse.de
Fri Nov 8 12:38:00 GMT 2024
Declare deprecated regcache::raw_write deprecated using [[deprecated]], and
rename existing uses that can be found using --enable-targets=all and
-Werror=deprecated-declarations to new function
regcache::deprecated_raw_write.
Tested on aarch64-linux.
---
gdb/amd64-tdep.c | 4 ++--
gdb/arm-tdep.c | 4 ++--
gdb/bfin-tdep.c | 2 +-
gdb/csky-tdep.c | 2 +-
gdb/frv-tdep.c | 6 +++---
gdb/h8300-tdep.c | 2 +-
gdb/i386-darwin-tdep.c | 2 +-
gdb/i386-tdep.c | 4 ++--
gdb/iq2000-tdep.c | 8 ++++----
gdb/m32c-tdep.c | 4 ++--
gdb/m68hc11-tdep.c | 2 +-
gdb/m68k-tdep.c | 8 ++++----
gdb/mep-tdep.c | 6 +++---
gdb/mips-tdep.c | 2 +-
gdb/mn10300-tdep.c | 2 +-
gdb/nds32-tdep.c | 2 +-
gdb/regcache.h | 11 +++++++++++
gdb/rl78-tdep.c | 22 +++++++++++-----------
gdb/rs6000-tdep.c | 22 +++++++++++-----------
gdb/s390-tdep.c | 4 ++--
gdb/sh-tdep.c | 12 ++++++------
gdb/sparc-tdep.c | 4 ++--
gdb/sparc64-tdep.c | 18 +++++++++---------
gdb/tilegx-tdep.c | 4 ++--
gdb/v850-tdep.c | 2 +-
gdb/xstormy16-tdep.c | 4 ++--
gdb/xtensa-tdep.c | 6 +++---
27 files changed, 90 insertions(+), 79 deletions(-)
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index eccd76df983..18157889ead 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -810,8 +810,8 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
if (writebuf)
{
i387_return_value (gdbarch, regcache);
- regcache->raw_write (AMD64_ST0_REGNUM, writebuf);
- regcache->raw_write (AMD64_ST1_REGNUM, writebuf + 16);
+ regcache->deprecated_raw_write (AMD64_ST0_REGNUM, writebuf);
+ regcache->deprecated_raw_write (AMD64_ST1_REGNUM, writebuf + 16);
/* Fix up the tag word such that both %st(0) and %st(1) are
marked as valid. */
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 847eb15ec9c..7f65e6579ba 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -9900,8 +9900,8 @@ arm_neon_quad_write (struct gdbarch *gdbarch, struct regcache *regcache,
double_regnum = user_reg_map_name_to_regnum (gdbarch, name_buf,
strlen (name_buf));
- regcache->raw_write (double_regnum, buf);
- regcache->raw_write (double_regnum + 1, buf + 8);
+ regcache->deprecated_raw_write (double_regnum, buf);
+ regcache->deprecated_raw_write (double_regnum + 1, buf + 8);
}
static void
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 6b2cf2a415d..c68f76b2200 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -720,7 +720,7 @@ bfin_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
/* Overlay the CC bit in the ASTAT register. */
regcache->deprecated_raw_read (BFIN_ASTAT_REGNUM, buf);
buf[0] = (buf[0] & ~ASTAT_CC) | ((buffer[0] & 1) << ASTAT_CC_POS);
- regcache->raw_write (BFIN_ASTAT_REGNUM, buf);
+ regcache->deprecated_raw_write (BFIN_ASTAT_REGNUM, buf);
}
static CORE_ADDR
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index e9a3cab6031..a606e1fbbe5 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -2657,7 +2657,7 @@ csky_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
regcache->deprecated_raw_read (gdb_regnum, reg_buf);
memcpy (reg_buf + offset, buf, 4);
- regcache->raw_write (gdb_regnum, reg_buf);
+ regcache->deprecated_raw_write (gdb_regnum, reg_buf);
return;
}
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 58e0aae8041..a150b26c638 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -334,8 +334,8 @@ frv_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
if (reg == iacc0_regnum)
{
- regcache->raw_write (iacc0h_regnum, buffer);
- regcache->raw_write (iacc0l_regnum, (bfd_byte *) buffer + 4);
+ regcache->deprecated_raw_write (iacc0h_regnum, buffer);
+ regcache->deprecated_raw_write (iacc0l_regnum, (bfd_byte *) buffer + 4);
}
else if (accg0_regnum <= reg && reg <= accg7_regnum)
{
@@ -348,7 +348,7 @@ frv_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
regcache->deprecated_raw_read (raw_regnum, buf);
buf[byte_num] = ((bfd_byte *) buffer)[0];
- regcache->raw_write (raw_regnum, buf);
+ regcache->deprecated_raw_write (raw_regnum, buf);
}
}
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index da52e348796..3e190186515 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1204,7 +1204,7 @@ h8300_pseudo_register_write (struct gdbarch *gdbarch,
else if (regno == E_PSEUDO_EXR_REGNUM (gdbarch))
raw_from_pseudo_register (gdbarch, regcache, buf, E_EXR_REGNUM, regno);
else
- regcache->raw_write (regno, buf);
+ regcache->deprecated_raw_write (regno, buf);
}
static int
diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c
index 0481296a46b..52881dec3e0 100644
--- a/gdb/i386-darwin-tdep.c
+++ b/gdb/i386-darwin-tdep.c
@@ -190,7 +190,7 @@ i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
if (write_pass)
{
const gdb_byte *val = args[i]->contents_all ().data ();
- regcache->raw_write (I387_MM0_REGNUM(tdep) + num_m128, val);
+ regcache->deprecated_raw_write (I387_MM0_REGNUM(tdep) + num_m128, val);
}
num_m128++;
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index fb09587cbc1..68ce4002b1b 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -2921,7 +2921,7 @@ i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
not exactly how it would happen on the target itself, but
it is the best we can do. */
target_float_convert (valbuf, type, buf, i387_ext_type (gdbarch));
- regcache->raw_write (I386_ST0_REGNUM, buf);
+ regcache->deprecated_raw_write (I386_ST0_REGNUM, buf);
/* Set the top of the floating-point register stack to 7. The
actual value doesn't really matter, but 7 is what a normal
@@ -2945,7 +2945,7 @@ i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
regcache->raw_write_part (LOW_RETURN_REGNUM, 0, len, valbuf);
else if (len <= (low_size + high_size))
{
- regcache->raw_write (LOW_RETURN_REGNUM, valbuf);
+ regcache->deprecated_raw_write (LOW_RETURN_REGNUM, valbuf);
regcache->raw_write_part (HIGH_RETURN_REGNUM, 0, len - low_size,
valbuf + low_size);
}
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 5776c66f78a..9e093c1ea68 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -491,7 +491,7 @@ iq2000_store_return_value (struct type *type, struct regcache *regcache,
memset (buf, 0, 4);
memcpy (buf + 4 - size, valbuf, size);
- regcache->raw_write (regno++, buf);
+ regcache->deprecated_raw_write (regno++, buf);
len -= size;
valbuf = ((char *) valbuf) + size;
}
@@ -721,7 +721,7 @@ iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
if (argreg <= E_LAST_ARGREG)
{
/* Passed in a register. */
- regcache->raw_write (argreg++, buf);
+ regcache->deprecated_raw_write (argreg++, buf);
}
else
{
@@ -740,8 +740,8 @@ iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
(must start with an even-numbered reg). */
if (((argreg - E_1ST_ARGREG) % 2) != 0)
argreg++;
- regcache->raw_write (argreg++, val);
- regcache->raw_write (argreg++, val + 4);
+ regcache->deprecated_raw_write (argreg++, val);
+ regcache->deprecated_raw_write (argreg++, val + 4);
}
else
{
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index fb954e39ded..5725649ac9b 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -321,7 +321,7 @@ static enum register_status
m32c_raw_write (struct m32c_reg *reg, struct regcache *cache,
const gdb_byte *buf)
{
- cache->raw_write (reg->num, buf);
+ cache->deprecated_raw_write (reg->num, buf);
return REG_VALID;
}
@@ -369,7 +369,7 @@ m32c_banked_write (struct m32c_reg *reg, struct regcache *cache,
const gdb_byte *buf)
{
struct m32c_reg *bank_reg = m32c_banked_register (reg, cache);
- cache->raw_write (bank_reg->num, buf);
+ cache->deprecated_raw_write (bank_reg->num, buf);
return REG_VALID;
}
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 1d50428b6fa..979f6d44c2c 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1257,7 +1257,7 @@ m68hc11_store_return_value (struct type *type, struct regcache *regcache,
else if (len <= 4)
{
regcache->raw_write_part (HARD_X_REGNUM, 4 - len, len - 2, valbuf);
- regcache->raw_write (HARD_D_REGNUM, valbuf + (len - 2));
+ regcache->deprecated_raw_write (HARD_D_REGNUM, valbuf + (len - 2));
}
else
error (_("return of value > 4 is not supported."));
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 16a34bcb144..f792c74ff11 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -349,17 +349,17 @@ m68k_store_return_value (struct type *type, struct regcache *regcache,
{
struct gdbarch *gdbarch = regcache->arch ();
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
- regcache->raw_write (tdep->pointer_result_regnum, valbuf);
+ regcache->deprecated_raw_write (tdep->pointer_result_regnum, valbuf);
/* gdb historically also set D0 in the SVR4 case. */
if (tdep->pointer_result_regnum != M68K_D0_REGNUM)
- regcache->raw_write (M68K_D0_REGNUM, valbuf);
+ regcache->deprecated_raw_write (M68K_D0_REGNUM, valbuf);
}
else if (len <= 4)
regcache->raw_write_part (M68K_D0_REGNUM, 4 - len, len, valbuf);
else if (len <= 8)
{
regcache->raw_write_part (M68K_D0_REGNUM, 8 - len, len - 4, valbuf);
- regcache->raw_write (M68K_D1_REGNUM, valbuf + (len - 4));
+ regcache->deprecated_raw_write (M68K_D1_REGNUM, valbuf + (len - 4));
}
else
internal_error (_("Cannot store return value of %d bytes long."), len);
@@ -377,7 +377,7 @@ m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
struct type *fpreg_type = register_type (gdbarch, M68K_FP0_REGNUM);
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
target_float_convert (valbuf, type, buf, fpreg_type);
- regcache->raw_write (M68K_FP0_REGNUM, buf);
+ regcache->deprecated_raw_write (M68K_FP0_REGNUM, buf);
}
else
m68k_store_return_value (type, regcache, valbuf);
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index 629ec34f5a8..4989ba73076 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -1225,7 +1225,7 @@ mep_pseudo_cr32_write (struct gdbarch *gdbarch,
/* Slow, but legible. */
store_unsigned_integer (buf64, 8, byte_order,
extract_unsigned_integer (buf, 4, byte_order));
- regcache->raw_write (rawnum, buf64);
+ regcache->deprecated_raw_write (rawnum, buf64);
}
@@ -1235,7 +1235,7 @@ mep_pseudo_cr64_write (struct gdbarch *gdbarch,
int cookednum,
const gdb_byte *buf)
{
- regcache->raw_write (mep_pseudo_to_raw[cookednum], buf);
+ regcache->deprecated_raw_write (mep_pseudo_to_raw[cookednum], buf);
}
@@ -1254,7 +1254,7 @@ mep_pseudo_register_write (struct gdbarch *gdbarch,
|| IS_FP_CR64_REGNUM (cookednum))
mep_pseudo_cr64_write (gdbarch, regcache, cookednum, buf);
else if (IS_CCR_REGNUM (cookednum))
- regcache->raw_write (mep_pseudo_to_raw[cookednum], buf);
+ regcache->deprecated_raw_write (mep_pseudo_to_raw[cookednum], buf);
else
gdb_assert_not_reached ("unexpected pseudo register");
}
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 302f762a38e..f6319b6ca4b 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -806,7 +806,7 @@ mips_pseudo_register_write (struct gdbarch *gdbarch,
gdb_assert (cookednum >= gdbarch_num_regs (gdbarch)
&& cookednum < 2 * gdbarch_num_regs (gdbarch));
if (register_size (gdbarch, rawnum) == register_size (gdbarch, cookednum))
- regcache->raw_write (rawnum, buf);
+ regcache->deprecated_raw_write (rawnum, buf);
else if (register_size (gdbarch, rawnum) >
register_size (gdbarch, cookednum))
{
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 367ce320517..70506016412 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -185,7 +185,7 @@ mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type,
regcache->raw_write_part (reg, 0, len, valbuf);
else if (len <= 2 * regsz)
{
- regcache->raw_write (reg, valbuf);
+ regcache->deprecated_raw_write (reg, valbuf);
gdb_assert (regsz == register_size (gdbarch, reg + 1));
regcache->raw_write_part (reg + 1, 0, len - regsz, valbuf + regsz);
}
diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c
index d989909a98a..2f2a0ea6c5e 100644
--- a/gdb/nds32-tdep.c
+++ b/gdb/nds32-tdep.c
@@ -495,7 +495,7 @@ nds32_pseudo_register_write (struct gdbarch *gdbarch,
fdr_regnum = NDS32_FD0_REGNUM + (regnum >> 1);
regcache->deprecated_raw_read (fdr_regnum, reg_buf);
memcpy (reg_buf + offset, buf, 4);
- regcache->raw_write (fdr_regnum, reg_buf);
+ regcache->deprecated_raw_write (fdr_regnum, reg_buf);
return;
}
diff --git a/gdb/regcache.h b/gdb/regcache.h
index e7feb24ebae..67f73346bf2 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -449,8 +449,19 @@ class regcache : public detached_regcache
void raw_write (int regnum, gdb::array_view<const gdb_byte> src);
/* Deprecated overload of the above. */
+ [[deprecated]]
void raw_write (int regnum, const gdb_byte *src);
+ /* Wrapper for deprecated raw_write that silences warnings for deprecated
+ declarations. */
+ void deprecated_raw_write (int regnum, const gdb_byte *src)
+ {
+DIAGNOSTIC_PUSH
+DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
+ raw_write (regnum, src);
+DIAGNOSTIC_POP
+ }
+
template<typename T, typename = RequireLongest<T>>
void raw_write (int regnum, T val);
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
index 4a8b9d117eb..c9977fda875 100644
--- a/gdb/rl78-tdep.c
+++ b/gdb/rl78-tdep.c
@@ -732,28 +732,28 @@ rl78_pseudo_register_write (struct gdbarch *gdbarch,
int raw_regnum = RL78_RAW_BANK0_R0_REGNUM
+ (reg - RL78_BANK0_R0_REGNUM);
- regcache->raw_write (raw_regnum, buffer);
+ regcache->deprecated_raw_write (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;
- regcache->raw_write (raw_regnum, buffer);
- regcache->raw_write (raw_regnum + 1, buffer + 1);
+ regcache->deprecated_raw_write (raw_regnum, buffer);
+ regcache->deprecated_raw_write (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;
- regcache->raw_write (raw_regnum, buffer);
- regcache->raw_write (raw_regnum + 1, buffer + 1);
+ regcache->deprecated_raw_write (raw_regnum, buffer);
+ regcache->deprecated_raw_write (raw_regnum + 1, buffer + 1);
}
else if (reg == RL78_SP_REGNUM)
{
- regcache->raw_write (RL78_SPL_REGNUM, buffer);
- regcache->raw_write (RL78_SPH_REGNUM, buffer + 1);
+ regcache->deprecated_raw_write (RL78_SPL_REGNUM, buffer);
+ regcache->deprecated_raw_write (RL78_SPH_REGNUM, buffer + 1);
}
else if (reg == RL78_PC_REGNUM)
{
@@ -761,7 +761,7 @@ rl78_pseudo_register_write (struct gdbarch *gdbarch,
memcpy (rawbuf, buffer, 3);
rawbuf[3] = 0;
- regcache->raw_write (RL78_RAW_PC_REGNUM, rawbuf);
+ regcache->deprecated_raw_write (RL78_RAW_PC_REGNUM, rawbuf);
}
else if (RL78_X_REGNUM <= reg && reg <= RL78_H_REGNUM)
{
@@ -774,7 +774,7 @@ rl78_pseudo_register_write (struct gdbarch *gdbarch,
/* RSB0 is at bit 3; RSBS1 is at bit 5. */
raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK
+ (reg - RL78_X_REGNUM);
- regcache->raw_write (raw_regnum, buffer);
+ regcache->deprecated_raw_write (raw_regnum, buffer);
}
else if (RL78_AX_REGNUM <= reg && reg <= RL78_HL_REGNUM)
{
@@ -786,8 +786,8 @@ rl78_pseudo_register_write (struct gdbarch *gdbarch,
/* RSB0 is at bit 3; RSBS1 is at bit 5. */
raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK
+ 2 * (reg - RL78_AX_REGNUM);
- regcache->raw_write (raw_regnum, buffer);
- regcache->raw_write (raw_regnum + 1, buffer + 1);
+ regcache->deprecated_raw_write (raw_regnum, buffer);
+ regcache->deprecated_raw_write (raw_regnum + 1, buffer + 1);
}
else
gdb_assert_not_reached ("invalid pseudo register number");
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index f82f30f4495..7147d191a60 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2837,7 +2837,7 @@ e500_move_ev_register (move_ev_register_func move,
static enum register_status
do_regcache_raw_write (struct regcache *regcache, int regnum, void *buffer)
{
- regcache->raw_write (regnum, (const gdb_byte *) buffer);
+ regcache->deprecated_raw_write (regnum, (const gdb_byte *) buffer);
return REG_VALID;
}
@@ -2948,13 +2948,13 @@ dfp_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
/* Write each half of the dl register into a separate
FP register. */
- regcache->raw_write (fp0 + 2 * reg_index, buffer);
- regcache->raw_write (fp0 + 2 * reg_index + 1, buffer + 8);
+ regcache->deprecated_raw_write (fp0 + 2 * reg_index, buffer);
+ regcache->deprecated_raw_write (fp0 + 2 * reg_index + 1, buffer + 8);
}
else
{
- regcache->raw_write (fp0 + 2 * reg_index + 1, buffer);
- regcache->raw_write (fp0 + 2 * reg_index, buffer + 8);
+ regcache->deprecated_raw_write (fp0 + 2 * reg_index + 1, buffer);
+ regcache->deprecated_raw_write (fp0 + 2 * reg_index, buffer + 8);
}
}
@@ -2983,7 +2983,7 @@ v_alias_pseudo_register_write (struct gdbarch *gdbarch,
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
- regcache->raw_write (tdep->ppc_vr0_regnum
+ regcache->deprecated_raw_write (tdep->ppc_vr0_regnum
+ (reg_nr - tdep->ppc_v0_alias_regnum), buffer);
}
@@ -3062,18 +3062,18 @@ vsx_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
/* Write the portion that overlaps the VMX registers. */
if (reg_index > 31)
- regcache->raw_write (vr0 + reg_index - 32, buffer);
+ regcache->deprecated_raw_write (vr0 + reg_index - 32, buffer);
else
/* Write the portion that overlaps the FPR registers. */
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
- regcache->raw_write (fp0 + reg_index, buffer);
- regcache->raw_write (vsr0_upper + reg_index, buffer + 8);
+ regcache->deprecated_raw_write (fp0 + reg_index, buffer);
+ regcache->deprecated_raw_write (vsr0_upper + reg_index, buffer + 8);
}
else
{
- regcache->raw_write (fp0 + reg_index, buffer + 8);
- regcache->raw_write (vsr0_upper + reg_index, buffer);
+ regcache->deprecated_raw_write (fp0 + reg_index, buffer + 8);
+ regcache->deprecated_raw_write (vsr0_upper + reg_index, buffer);
}
}
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 0f477b40eed..6c5e114bb6a 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1435,8 +1435,8 @@ s390_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
if (regnum_is_vxr_full (tdep, regnum))
{
regnum -= tdep->v0_full_regnum;
- regcache->raw_write (S390_F0_REGNUM + regnum, buf);
- regcache->raw_write (S390_V0_LOWER_REGNUM + regnum, buf + 8);
+ regcache->deprecated_raw_write (S390_F0_REGNUM + regnum, buf);
+ regcache->deprecated_raw_write (S390_V0_LOWER_REGNUM + regnum, buf + 8);
return;
}
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index c1b361127d9..b82a853245a 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1335,7 +1335,7 @@ sh_store_return_value_nofpu (struct type *type, struct regcache *regcache,
{
int i, regnum = R0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache->raw_write (regnum++, valbuf + i);
+ regcache->deprecated_raw_write (regnum++, valbuf + i);
}
}
@@ -1350,10 +1350,10 @@ sh_store_return_value_fpu (struct type *type, struct regcache *regcache,
int i, regnum = gdbarch_fp0_regnum (gdbarch);
for (i = 0; i < len; i += 4)
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
- regcache->raw_write (regnum++,
+ regcache->deprecated_raw_write (regnum++,
valbuf + len - 4 - i);
else
- regcache->raw_write (regnum++, valbuf + i);
+ regcache->deprecated_raw_write (regnum++, valbuf + i);
}
else
sh_store_return_value_nofpu (type, regcache, valbuf);
@@ -1685,7 +1685,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
so that a re-read happens next time it's necessary. */
int bregnum;
- regcache->raw_write (BANK_REGNUM, buffer);
+ regcache->deprecated_raw_write (BANK_REGNUM, buffer);
for (bregnum = R0_BANK0_REGNUM; bregnum < MACLB_REGNUM; ++bregnum)
regcache->invalidate (bregnum);
}
@@ -1701,7 +1701,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache->raw_write (base_regnum + portion,
+ regcache->deprecated_raw_write (base_regnum + portion,
(temp_buffer
+ register_size (gdbarch,
base_regnum) * portion));
@@ -1712,7 +1712,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache->raw_write (base_regnum + portion,
+ regcache->deprecated_raw_write (base_regnum + portion,
(buffer
+ register_size (gdbarch,
base_regnum) * portion));
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 2dcde5c6f75..5a80db58dc5 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -544,8 +544,8 @@ sparc32_pseudo_register_write (struct gdbarch *gdbarch,
gdb_assert (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM);
regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC32_D0_REGNUM);
- regcache->raw_write (regnum, buf);
- regcache->raw_write (regnum + 1, buf + 4);
+ regcache->deprecated_raw_write (regnum, buf);
+ regcache->deprecated_raw_write (regnum + 1, buf + 4);
}
/* Implement the stack_frame_destroyed_p gdbarch method. */
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 61405f8d144..49e2f57f8f7 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -985,27 +985,27 @@ sparc64_pseudo_register_write (struct gdbarch *gdbarch,
if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D30_REGNUM)
{
regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC64_D0_REGNUM);
- regcache->raw_write (regnum, buf);
- regcache->raw_write (regnum + 1, buf + 4);
+ regcache->deprecated_raw_write (regnum, buf);
+ regcache->deprecated_raw_write (regnum + 1, buf + 4);
}
else if (regnum >= SPARC64_D32_REGNUM && regnum <= SPARC64_D62_REGNUM)
{
regnum = SPARC64_F32_REGNUM + (regnum - SPARC64_D32_REGNUM);
- regcache->raw_write (regnum, buf);
+ regcache->deprecated_raw_write (regnum, buf);
}
else if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q28_REGNUM)
{
regnum = SPARC_F0_REGNUM + 4 * (regnum - SPARC64_Q0_REGNUM);
- regcache->raw_write (regnum, buf);
- regcache->raw_write (regnum + 1, buf + 4);
- regcache->raw_write (regnum + 2, buf + 8);
- regcache->raw_write (regnum + 3, buf + 12);
+ regcache->deprecated_raw_write (regnum, buf);
+ regcache->deprecated_raw_write (regnum + 1, buf + 4);
+ regcache->deprecated_raw_write (regnum + 2, buf + 8);
+ regcache->deprecated_raw_write (regnum + 3, buf + 12);
}
else if (regnum >= SPARC64_Q32_REGNUM && regnum <= SPARC64_Q60_REGNUM)
{
regnum = SPARC64_F32_REGNUM + 2 * (regnum - SPARC64_Q32_REGNUM);
- regcache->raw_write (regnum, buf);
- regcache->raw_write (regnum + 1, buf + 8);
+ regcache->deprecated_raw_write (regnum, buf);
+ regcache->deprecated_raw_write (regnum + 1, buf + 8);
}
else if (regnum == SPARC64_CWP_REGNUM
|| regnum == SPARC64_PSTATE_REGNUM
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index b1b42cc4b0d..081b717fa48 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -232,7 +232,7 @@ tilegx_store_return_value (struct type *type, struct regcache *regcache,
gdb_byte buf[tilegx_reg_size] = { 0 };
memcpy (buf, valbuf, type->length ());
- regcache->raw_write (TILEGX_R0_REGNUM, buf);
+ regcache->deprecated_raw_write (TILEGX_R0_REGNUM, buf);
}
else
{
@@ -240,7 +240,7 @@ tilegx_store_return_value (struct type *type, struct regcache *regcache,
int i, regnum = TILEGX_R0_REGNUM;
for (i = 0; i < len; i += tilegx_reg_size)
- regcache->raw_write (regnum++, (gdb_byte *) valbuf + i);
+ regcache->deprecated_raw_write (regnum++, (gdb_byte *) valbuf + i);
}
}
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 5e812a58091..b0c3b19e756 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1153,7 +1153,7 @@ v850_store_return_value (struct type *type, struct regcache *regcache,
{
int i, regnum = E_V0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache->raw_write (regnum++, valbuf + i);
+ regcache->deprecated_raw_write (regnum++, valbuf + i);
}
}
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 6e324a2313f..cb0207ec087 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -176,7 +176,7 @@ xstormy16_store_return_value (struct type *type, struct regcache *regcache,
gdb_byte buf[xstormy16_reg_size];
memset (buf, 0, xstormy16_reg_size);
memcpy (buf, valbuf, 1);
- regcache->raw_write (E_1ST_ARG_REGNUM, buf);
+ regcache->deprecated_raw_write (E_1ST_ARG_REGNUM, buf);
}
else
{
@@ -184,7 +184,7 @@ xstormy16_store_return_value (struct type *type, struct regcache *regcache,
int i, regnum = E_1ST_ARG_REGNUM;
for (i = 0; i < len; i += xstormy16_reg_size)
- regcache->raw_write (regnum++, valbuf + i);
+ regcache->deprecated_raw_write (regnum++, valbuf + i);
}
}
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 239ab42928a..febd76e0508 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -648,7 +648,7 @@ xtensa_pseudo_register_write (struct gdbarch *gdbarch,
/* We can always write 'core' registers.
Note: We might have converted Ax->ARy. */
if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
- regcache->raw_write (regnum, buffer);
+ regcache->deprecated_raw_write (regnum, buffer);
/* We have to find out how to deal with privileged registers.
Let's treat them as pseudo-registers, but we cannot read/write them. */
@@ -703,7 +703,7 @@ xtensa_pseudo_register_write (struct gdbarch *gdbarch,
}
/* Assume that we can write the register. */
- regcache->raw_write (regnum, buffer);
+ regcache->deprecated_raw_write (regnum, buffer);
}
else
internal_error (_("invalid register number %d"), regnum);
@@ -1628,7 +1628,7 @@ xtensa_store_return_value (struct type *type,
if (len < 4)
regcache->raw_write_part (areg, offset, len, valbuf);
else
- regcache->raw_write (areg, valbuf);
+ regcache->deprecated_raw_write (areg, valbuf);
}
}
--
2.35.3
More information about the Gdb-patches
mailing list