From: Simon Marchi Date: Fri, 9 Jan 2026 16:56:46 +0000 (-0500) Subject: gdb: remove gdbarch_ecoff_reg_to_regnum X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd8ebd38208e1919581322430680eaa340779739;p=thirdparty%2Fbinutils-gdb.git gdb: remove gdbarch_ecoff_reg_to_regnum It is unused since the mdebugread removal. Change-Id: I76a2f4208f00784770dbdcb601b12282914b1cd5 Approved-By: Tom Tromey --- diff --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c index f2591709a89..76704034149 100644 --- a/gdb/gdbarch-gen.c +++ b/gdb/gdbarch-gen.c @@ -85,7 +85,6 @@ struct gdbarch int pc_regnum = -1; int ps_regnum = -1; int fp0_regnum = -1; - gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum = no_op_reg_to_regnum; gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum = no_op_reg_to_regnum; gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum = no_op_reg_to_regnum; gdbarch_register_name_ftype *register_name = nullptr; @@ -346,7 +345,6 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of pc_regnum, invalid_p == 0. */ /* Skip verify of ps_regnum, invalid_p == 0. */ /* Skip verify of fp0_regnum, invalid_p == 0. */ - /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0. */ /* Skip verify of sdb_reg_to_regnum, invalid_p == 0. */ /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0. */ if (gdbarch->register_name == 0) @@ -705,9 +703,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: fp0_regnum = %s\n", plongest (gdbarch->fp0_regnum)); - gdb_printf (file, - "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n", - host_address_to_string (gdbarch->ecoff_reg_to_regnum)); gdb_printf (file, "gdbarch_dump: sdb_reg_to_regnum = <%s>\n", host_address_to_string (gdbarch->sdb_reg_to_regnum)); @@ -2151,23 +2146,6 @@ set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, gdbarch->fp0_regnum = fp0_regnum; } -int -gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); - if (gdbarch_debug >= 2) - gdb_printf (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); - return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr); -} - -void -set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, - gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) -{ - gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; -} - int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) { diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index 2fbb09a38f8..592858bfd31 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -283,12 +283,6 @@ extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum); extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch); extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum); -/* Provide a default mapping from a ecoff register number to a gdb REGNUM. */ - -typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int ecoff_regnr); -extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr); -extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum); - /* Convert from an sdb register number to an internal gdb register number. */ typedef int (gdbarch_sdb_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int sdb_regnr); diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index 3f23dfce877..bff4346166e 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -544,17 +544,6 @@ Value( invalid=False, ) -Method( - comment=""" -Provide a default mapping from a ecoff register number to a gdb REGNUM. -""", - type="int", - name="ecoff_reg_to_regnum", - params=[("int", "ecoff_regnr")], - predefault="no_op_reg_to_regnum", - invalid=False, -) - Method( comment=""" Convert from an sdb register number to an internal gdb register number. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 69767f50075..a3046029919 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -7895,11 +7895,14 @@ mips_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc) return pc != requested_pc ? pc : 0; } -/* Convert a dwarf, dwarf2, or ecoff register number to a GDB [1 * - gdbarch_num_regs .. 2 * gdbarch_num_regs) REGNUM. */ +/* Convert a DWARF register number to a GDB + + [1 * gdbarch_num_regs .. 2 * gdbarch_num_regs) + + REGNUM. */ static int -mips_dwarf_dwarf2_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int num) +mips_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int num) { int regnum; if (num >= 0 && num < 32) @@ -8667,10 +8670,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_dummy_id (gdbarch, mips_dummy_id); /* Map debug register numbers onto internal register numbers. */ - set_gdbarch_ecoff_reg_to_regnum (gdbarch, - mips_dwarf_dwarf2_ecoff_reg_to_regnum); - set_gdbarch_dwarf2_reg_to_regnum (gdbarch, - mips_dwarf_dwarf2_ecoff_reg_to_regnum); + set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mips_dwarf_reg_to_regnum); set_gdbarch_register_sim_regno (gdbarch, mips_register_sim_regno); /* MIPS version of CALL_DUMMY. */