diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-12-01 11:27:29 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-12-14 16:04:49 +0000 |
commit | 7f0f3b0f5659f21815ef87e1e9e120213a4f347b (patch) | |
tree | d91d628c9d655a06b093d3ab3193760bbd472475 | |
parent | d1340b1763f08906de8575d0e4bac8860bc92295 (diff) | |
download | gdb-7f0f3b0f5659f21815ef87e1e9e120213a4f347b.zip gdb-7f0f3b0f5659f21815ef87e1e9e120213a4f347b.tar.gz gdb-7f0f3b0f5659f21815ef87e1e9e120213a4f347b.tar.bz2 |
gdb: rename gdbarch_pseudo_register_write to gdbarch_deprecated_pseudo_register_write
The next patch introduces a new variant of gdbarch_pseudo_register_write
that takes a frame instead of a regcache for implementations to write
raw registers. Rename to old one to make it clear it's deprecated.
Change-Id: If8872c89c6f8a1edfcab983eb064248fd5ff3115
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
-rw-r--r-- | gdb/aarch64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 4 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 2 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 3 | ||||
-rw-r--r-- | gdb/bfin-tdep.c | 3 | ||||
-rw-r--r-- | gdb/csky-tdep.c | 4 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 3 | ||||
-rw-r--r-- | gdb/gdbarch-gen.h | 15 | ||||
-rw-r--r-- | gdb/gdbarch.c | 30 | ||||
-rw-r--r-- | gdb/gdbarch_components.py | 10 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 3 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 3 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 3 | ||||
-rw-r--r-- | gdb/m32c-tdep.c | 3 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 3 | ||||
-rw-r--r-- | gdb/mep-tdep.c | 3 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 3 | ||||
-rw-r--r-- | gdb/msp430-tdep.c | 3 | ||||
-rw-r--r-- | gdb/nds32-tdep.c | 3 | ||||
-rw-r--r-- | gdb/regcache.c | 4 | ||||
-rw-r--r-- | gdb/riscv-tdep.c | 9 | ||||
-rw-r--r-- | gdb/rl78-tdep.c | 3 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 4 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 3 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 9 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 3 | ||||
-rw-r--r-- | gdb/sparc64-tdep.c | 3 | ||||
-rw-r--r-- | gdb/xtensa-tdep.c | 3 |
28 files changed, 90 insertions, 54 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index d901b69..5b2d87b 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -4481,7 +4481,7 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_pseudo_regs (gdbarch, num_pseudo_regs); set_gdbarch_pseudo_register_read_value (gdbarch, aarch64_pseudo_read_value); - set_gdbarch_pseudo_register_write (gdbarch, aarch64_pseudo_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, aarch64_pseudo_write); set_tdesc_pseudo_register_name (gdbarch, aarch64_pseudo_register_name); set_tdesc_pseudo_register_type (gdbarch, aarch64_pseudo_register_type); set_tdesc_pseudo_register_reggroup_p (gdbarch, diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 955a686..a0b4986 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -3205,8 +3205,8 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, set_gdbarch_pseudo_register_read_value (gdbarch, amd64_pseudo_register_read_value); - set_gdbarch_pseudo_register_write (gdbarch, - amd64_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + amd64_pseudo_register_write); set_gdbarch_ax_pseudo_register_collect (gdbarch, amd64_ax_pseudo_register_collect); diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 1ee8bdf..85fd37b 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -10906,7 +10906,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { set_gdbarch_num_pseudo_regs (gdbarch, num_pseudos); set_gdbarch_pseudo_register_read (gdbarch, arm_pseudo_read); - set_gdbarch_pseudo_register_write (gdbarch, arm_pseudo_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, arm_pseudo_write); } /* Add standard register aliases. We add aliases even for those diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index be06010..c0b954c 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1510,7 +1510,8 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_pseudo_regs (gdbarch, AVR_NUM_PSEUDO_REGS); set_gdbarch_pseudo_register_read (gdbarch, avr_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, avr_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + avr_pseudo_register_write); set_gdbarch_return_value (gdbarch, avr_return_value); diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index 4b9067a..0ff4355 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -805,7 +805,8 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, BFIN_NUM_REGS); set_gdbarch_pseudo_register_read (gdbarch, bfin_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, bfin_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + bfin_pseudo_register_write); set_gdbarch_num_pseudo_regs (gdbarch, BFIN_NUM_PSEUDO_REGS); set_gdbarch_sp_regnum (gdbarch, BFIN_SP_REGNUM); set_gdbarch_pc_regnum (gdbarch, BFIN_PC_REGNUM); diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index e82b8df..6cca720 100644 --- a/gdb/csky-tdep.c +++ b/gdb/csky-tdep.c @@ -2872,8 +2872,8 @@ csky_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->fv_pseudo_registers_count); set_gdbarch_pseudo_register_read (gdbarch, csky_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, - csky_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write + (gdbarch, csky_pseudo_register_write); set_tdesc_pseudo_register_name (gdbarch, csky_pseudo_register_name); } diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 6528cf3..7944228 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1499,7 +1499,8 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_sim_regno (gdbarch, frv_register_sim_regno); set_gdbarch_pseudo_register_read (gdbarch, frv_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, frv_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + frv_pseudo_register_write); set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue); set_gdbarch_skip_main_prologue (gdbarch, frv_skip_main_prologue); diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index c70bfc9..7b34dce 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -200,11 +200,18 @@ typedef struct value * (gdbarch_pseudo_register_read_value_ftype) (struct gdbarc extern struct value * gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, frame_info_ptr next_frame, int cookednum); extern void set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value); -extern bool gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch); +/* Write bytes to a pseudo register. -typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf); -extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf); -extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write); + This is marked as deprecated because it gets passed a regcache for + implementations to write raw registers in. This doesn't work for unwound + frames, where the raw registers backing the pseudo registers may have been + saved elsewhere. */ + +extern bool gdbarch_deprecated_pseudo_register_write_p (struct gdbarch *gdbarch); + +typedef void (gdbarch_deprecated_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf); +extern void gdbarch_deprecated_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf); +extern void set_gdbarch_deprecated_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_deprecated_pseudo_register_write_ftype *deprecated_pseudo_register_write); extern int gdbarch_num_regs (struct gdbarch *gdbarch); extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 06ff5257..e198d33 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -74,7 +74,7 @@ struct gdbarch gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer = legacy_virtual_frame_pointer; gdbarch_pseudo_register_read_ftype *pseudo_register_read = nullptr; gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value = nullptr; - gdbarch_pseudo_register_write_ftype *pseudo_register_write = nullptr; + gdbarch_deprecated_pseudo_register_write_ftype *deprecated_pseudo_register_write = nullptr; int num_regs = -1; int num_pseudo_regs = 0; gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect = nullptr; @@ -330,7 +330,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ /* Skip verify of pseudo_register_read, has predicate. */ /* Skip verify of pseudo_register_read_value, has predicate. */ - /* Skip verify of pseudo_register_write, has predicate. */ + /* Skip verify of deprecated_pseudo_register_write, has predicate. */ if (gdbarch->num_regs == -1) log.puts ("\n\tnum_regs"); /* Skip verify of num_pseudo_regs, invalid_p == 0 */ @@ -650,11 +650,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: pseudo_register_read_value = <%s>\n", host_address_to_string (gdbarch->pseudo_register_read_value)); gdb_printf (file, - "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", - gdbarch_pseudo_register_write_p (gdbarch)); + "gdbarch_dump: gdbarch_deprecated_pseudo_register_write_p() = %d\n", + gdbarch_deprecated_pseudo_register_write_p (gdbarch)); gdb_printf (file, - "gdbarch_dump: pseudo_register_write = <%s>\n", - host_address_to_string (gdbarch->pseudo_register_write)); + "gdbarch_dump: deprecated_pseudo_register_write = <%s>\n", + host_address_to_string (gdbarch->deprecated_pseudo_register_write)); gdb_printf (file, "gdbarch_dump: num_regs = %s\n", plongest (gdbarch->num_regs)); @@ -1903,27 +1903,27 @@ set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, } bool -gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) +gdbarch_deprecated_pseudo_register_write_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - return gdbarch->pseudo_register_write != NULL; + return gdbarch->deprecated_pseudo_register_write != NULL; } void -gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf) +gdbarch_deprecated_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf) { gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->pseudo_register_write != NULL); + gdb_assert (gdbarch->deprecated_pseudo_register_write != NULL); if (gdbarch_debug >= 2) - gdb_printf (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); - gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); + gdb_printf (gdb_stdlog, "gdbarch_deprecated_pseudo_register_write called\n"); + gdbarch->deprecated_pseudo_register_write (gdbarch, regcache, cookednum, buf); } void -set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, - gdbarch_pseudo_register_write_ftype pseudo_register_write) +set_gdbarch_deprecated_pseudo_register_write (struct gdbarch *gdbarch, + gdbarch_deprecated_pseudo_register_write_ftype deprecated_pseudo_register_write) { - gdbarch->pseudo_register_write = pseudo_register_write; + gdbarch->deprecated_pseudo_register_write = deprecated_pseudo_register_write; } int diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index c597b38..ee3fd2b 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -419,8 +419,16 @@ never be called. ) Method( + comment=""" +Write bytes to a pseudo register. + +This is marked as deprecated because it gets passed a regcache for +implementations to write raw registers in. This doesn't work for unwound +frames, where the raw registers backing the pseudo registers may have been +saved elsewhere. +""", type="void", - name="pseudo_register_write", + name="deprecated_pseudo_register_write", params=[ ("struct regcache *", "regcache"), ("int", "cookednum"), diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index d149491..20f503c 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1318,7 +1318,8 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } set_gdbarch_pseudo_register_read (gdbarch, h8300_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, h8300_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + h8300_pseudo_register_write); /* * Basic register fields and methods. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index cb24a73..b7e627f 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -8686,7 +8686,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Pseudo registers may be changed by amd64_init_abi. */ set_gdbarch_pseudo_register_read_value (gdbarch, i386_pseudo_register_read_value); - set_gdbarch_pseudo_register_write (gdbarch, i386_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + i386_pseudo_register_write); set_gdbarch_ax_pseudo_register_collect (gdbarch, i386_ax_pseudo_register_collect); diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index b009b46..699959a 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -3959,7 +3959,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_type (gdbarch, ia64_register_type); set_gdbarch_pseudo_register_read (gdbarch, ia64_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, ia64_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + ia64_pseudo_register_write); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, ia64_dwarf_reg_to_regnum); set_gdbarch_register_reggroup_p (gdbarch, ia64_register_reggroup_p); set_gdbarch_convert_register_p (gdbarch, ia64_convert_register_p); diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index a0f1779..3efeb00 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -977,7 +977,8 @@ make_regs (struct gdbarch *arch) set_gdbarch_register_name (arch, m32c_register_name); set_gdbarch_register_type (arch, m32c_register_type); set_gdbarch_pseudo_register_read (arch, m32c_pseudo_register_read); - set_gdbarch_pseudo_register_write (arch, m32c_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (arch, + m32c_pseudo_register_write); set_gdbarch_register_sim_regno (arch, m32c_register_sim_regno); set_gdbarch_stab_reg_to_regnum (arch, m32c_debug_info_reg_to_regnum); set_gdbarch_dwarf2_reg_to_regnum (arch, m32c_debug_info_reg_to_regnum); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 1257c55..668158f 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1491,7 +1491,8 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_register_name (gdbarch, m68hc11_register_name); set_gdbarch_register_type (gdbarch, m68hc11_register_type); set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + m68hc11_pseudo_register_write); set_gdbarch_push_dummy_call (gdbarch, m68hc11_push_dummy_call); diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 6210b92..ad630d6 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -2424,7 +2424,8 @@ mep_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_type (gdbarch, mep_register_type); set_gdbarch_num_pseudo_regs (gdbarch, MEP_NUM_PSEUDO_REGS); set_gdbarch_pseudo_register_read (gdbarch, mep_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, mep_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + mep_pseudo_register_write); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mep_debug_reg_to_regnum); set_gdbarch_stab_reg_to_regnum (gdbarch, mep_debug_reg_to_regnum); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index fc3193e..8749c7c 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -8518,7 +8518,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_long_double_bit (gdbarch, 64); set_gdbarch_register_reggroup_p (gdbarch, mips_register_reggroup_p); set_gdbarch_pseudo_register_read (gdbarch, mips_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, mips_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + mips_pseudo_register_write); set_gdbarch_ax_pseudo_register_collect (gdbarch, mips_ax_pseudo_register_collect); diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index c03e12c..cc2ac4d 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -937,7 +937,8 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sp_regnum (gdbarch, MSP430_SP_REGNUM); set_gdbarch_register_reggroup_p (gdbarch, msp430_register_reggroup_p); set_gdbarch_pseudo_register_read (gdbarch, msp430_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, msp430_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + msp430_pseudo_register_write); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, msp430_dwarf2_reg_to_regnum); set_gdbarch_register_sim_regno (gdbarch, msp430_register_sim_regno); diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c index 7618a81..83685d0 100644 --- a/gdb/nds32-tdep.c +++ b/gdb/nds32-tdep.c @@ -2001,7 +2001,8 @@ nds32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) else if (use_pseudo_fsrs == 1) { set_gdbarch_pseudo_register_read (gdbarch, nds32_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, nds32_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write + (gdbarch, nds32_pseudo_register_write); set_tdesc_pseudo_register_name (gdbarch, nds32_pseudo_register_name); set_tdesc_pseudo_register_type (gdbarch, nds32_pseudo_register_type); set_gdbarch_num_pseudo_regs (gdbarch, num_fsr_map[fpu_freg]); diff --git a/gdb/regcache.c b/gdb/regcache.c index 9575988..0e3316a 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -912,8 +912,8 @@ regcache::cooked_write (int regnum, gdb::array_view<const gdb_byte> src) if (regnum < num_raw_registers ()) raw_write (regnum, src); else - gdbarch_pseudo_register_write (m_descr->gdbarch, this, regnum, - src.data ()); + gdbarch_deprecated_pseudo_register_write (m_descr->gdbarch, this, regnum, + src.data ()); } /* See regcache.h. */ diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 8110a8d..4c129a6 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -1002,9 +1002,9 @@ riscv_pseudo_register_read (struct gdbarch *gdbarch, return REG_UNKNOWN; } -/* Implement gdbarch_pseudo_register_write. Write the contents of BUF into - pseudo-register REGNUM in REGCACHE. BUF is sized based on the type of - register REGNUM. */ +/* Implement gdbarch_deprecated_pseudo_register_write. Write the contents of + BUF into pseudo-register REGNUM in REGCACHE. BUF is sized based on the type + of register REGNUM. */ static void riscv_pseudo_register_write (struct gdbarch *gdbarch, @@ -4229,7 +4229,8 @@ riscv_gdbarch_init (struct gdbarch_info info, set_tdesc_pseudo_register_reggroup_p (gdbarch, riscv_pseudo_register_reggroup_p); set_gdbarch_pseudo_register_read (gdbarch, riscv_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, riscv_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + riscv_pseudo_register_write); /* Finalise the target description registers. */ tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data), diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c index 2f40fbd..1929806 100644 --- a/gdb/rl78-tdep.c +++ b/gdb/rl78-tdep.c @@ -1436,7 +1436,8 @@ rl78_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, RL78_PC_REGNUM); set_gdbarch_sp_regnum (gdbarch, RL78_SP_REGNUM); set_gdbarch_pseudo_register_read (gdbarch, rl78_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, rl78_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + rl78_pseudo_register_write); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, rl78_dwarf_reg_to_regnum); set_gdbarch_register_reggroup_p (gdbarch, rl78_register_reggroup_p); set_gdbarch_register_sim_regno (gdbarch, rl78_register_sim_regno); diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 643997e..a7e0bf5 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -8353,8 +8353,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) || have_vsx || have_htm_fpu || have_htm_vsx) { set_gdbarch_pseudo_register_read (gdbarch, rs6000_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, - rs6000_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write + (gdbarch, rs6000_pseudo_register_write); set_gdbarch_ax_pseudo_register_collect (gdbarch, rs6000_ax_pseudo_register_collect); } diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 5b58cb3..fcba7a1 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -7081,7 +7081,8 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Pseudo registers. */ set_gdbarch_pseudo_register_read (gdbarch, s390_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, s390_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + s390_pseudo_register_write); set_tdesc_pseudo_register_name (gdbarch, s390_pseudo_register_name); set_tdesc_pseudo_register_type (gdbarch, s390_pseudo_register_type); set_tdesc_pseudo_register_reggroup_p (gdbarch, diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index babf85e..ae1ce1e 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2286,7 +2286,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_fp0_regnum (gdbarch, 25); set_gdbarch_num_pseudo_regs (gdbarch, 9); set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + sh_pseudo_register_write); set_gdbarch_return_value (gdbarch, sh_return_value_fpu); set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu); break; @@ -2297,7 +2298,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_pseudo_regs (gdbarch, 1); set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + sh_pseudo_register_write); break; case bfd_mach_sh_dsp: @@ -2337,7 +2339,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_fp0_regnum (gdbarch, 25); set_gdbarch_num_pseudo_regs (gdbarch, 13); set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + sh_pseudo_register_write); set_gdbarch_return_value (gdbarch, sh_return_value_fpu); set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu); break; diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 78f240d..3a053a9 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1844,7 +1844,8 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_tdesc_pseudo_register_name (gdbarch, sparc32_pseudo_register_name); set_tdesc_pseudo_register_type (gdbarch, sparc32_pseudo_register_type); set_gdbarch_pseudo_register_read (gdbarch, sparc32_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, sparc32_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + sparc32_pseudo_register_write); /* Register numbers of various important registers. */ set_gdbarch_sp_regnum (gdbarch, SPARC_SP_REGNUM); /* %sp */ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index abbbb73..61f4866 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -1825,7 +1825,8 @@ sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_tdesc_pseudo_register_name (gdbarch, sparc64_pseudo_register_name); set_tdesc_pseudo_register_type (gdbarch, sparc64_pseudo_register_type); set_gdbarch_pseudo_register_read (gdbarch, sparc64_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, sparc64_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + sparc64_pseudo_register_write); /* Register numbers of various important registers. */ set_gdbarch_pc_regnum (gdbarch, SPARC64_PC_REGNUM); /* %pc */ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 9e7bfde..6e426c4 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -3176,7 +3176,8 @@ xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Pseudo-Register read/write. */ set_gdbarch_pseudo_register_read (gdbarch, xtensa_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, xtensa_pseudo_register_write); + set_gdbarch_deprecated_pseudo_register_write (gdbarch, + xtensa_pseudo_register_write); /* Set target information. */ set_gdbarch_num_regs (gdbarch, tdep->num_regs); |