]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove the sofun_address_maybe_missing gdbarch setting
authorTom Tromey <tom@tromey.com>
Fri, 9 Jan 2026 19:19:11 +0000 (12:19 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 7 Feb 2026 14:56:29 +0000 (07:56 -0700)
The gdbarch setting sofun_address_maybe_missing was stabs-specific and
so can be removed.

gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/i386-linux-tdep.c
gdb/rs6000-tdep.c
gdb/sol2-tdep.c

index 73e0b84c6dcd22ebd494a726ba2e8a23a05f267f..573f6eefc96091376e45948868b5f0e5ed0a2dab 100644 (file)
@@ -196,7 +196,6 @@ struct gdbarch
   gdbarch_relocate_instruction_ftype *relocate_instruction = nullptr;
   gdbarch_overlay_update_ftype *overlay_update = nullptr;
   gdbarch_core_read_description_ftype *core_read_description = nullptr;
-  int sofun_address_maybe_missing = 0;
   gdbarch_process_record_ftype *process_record = nullptr;
   gdbarch_process_record_signal_ftype *process_record_signal = nullptr;
   gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target = nullptr;
@@ -461,7 +460,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of relocate_instruction, invalid_p == 0.  */
   /* Skip verify of overlay_update, has predicate.  */
   /* Skip verify of core_read_description, has predicate.  */
-  /* Skip verify of sofun_address_maybe_missing, invalid_p == 0.  */
   /* Skip verify of process_record, has predicate.  */
   /* Skip verify of process_record_signal, has predicate.  */
   /* Skip verify of gdb_signal_from_target, has predicate.  */
@@ -1120,9 +1118,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
   gdb_printf (file,
              "gdbarch_dump: core_read_description = <%s>\n",
              host_address_to_string (gdbarch->core_read_description));
-  gdb_printf (file,
-             "gdbarch_dump: sofun_address_maybe_missing = %s\n",
-             plongest (gdbarch->sofun_address_maybe_missing));
   gdb_printf (file,
              "gdbarch_dump: gdbarch_process_record_p() = %d\n",
              gdbarch_process_record_p (gdbarch));
@@ -4203,23 +4198,6 @@ set_gdbarch_core_read_description (struct gdbarch *gdbarch,
   gdbarch->core_read_description = core_read_description;
 }
 
-int
-gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  /* Skip verify of sofun_address_maybe_missing, invalid_p == 0.  */
-  if (gdbarch_debug >= 2)
-    gdb_printf (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
-  return gdbarch->sofun_address_maybe_missing;
-}
-
-void
-set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
-                                        int sofun_address_maybe_missing)
-{
-  gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
-}
-
 bool
 gdbarch_process_record_p (struct gdbarch *gdbarch)
 {
index 7b3396c4f810e74834575ca08d2e7c72868eeff8..1ff02b1067c590d6e99924fc1cac49069cbcb701 100644 (file)
@@ -1210,11 +1210,6 @@ typedef const struct target_desc * (gdbarch_core_read_description_ftype) (struct
 extern const struct target_desc * gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd);
 extern void set_gdbarch_core_read_description (struct gdbarch *gdbarch, gdbarch_core_read_description_ftype *core_read_description);
 
-/* Set if the address in N_SO or N_FUN stabs may be zero. */
-
-extern int gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch);
-extern void set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch, int sofun_address_maybe_missing);
-
 /* Parse the instruction at ADDR storing in the record execution log
    the registers REGCACHE and memory ranges that will be affected when
    the instruction executes, along with their current values.
index e0fd82c3002b6dfbb2cd9d5401e76087fcb9f135..6e765e9315514d47a1bc6348adb700a535b21bfc 100644 (file)
@@ -1987,16 +1987,6 @@ Method(
     predicate=True,
 )
 
-Value(
-    comment="""
-Set if the address in N_SO or N_FUN stabs may be zero.
-""",
-    type="int",
-    name="sofun_address_maybe_missing",
-    predefault="0",
-    invalid=False,
-)
-
 Method(
     comment="""
 Parse the instruction at ADDR storing in the record execution log
index 7a2a1867f989bb6643bfc1797918e6363346051d..b122e5fac8336e24624fae5fe290917109423ce1 100644 (file)
@@ -1627,10 +1627,6 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   tdep->i386_sysenter_record = i386_linux_intx80_sysenter_syscall_record;
   tdep->i386_syscall_record = i386_linux_intx80_sysenter_syscall_record;
 
-  /* N_FUN symbols in shared libraries have 0 for their values and need
-     to be relocated.  */
-  set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
-
   /* GNU/Linux uses SVR4-style shared libraries.  */
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
   set_solib_svr4_ops (gdbarch, make_linux_ilp32_svr4_solib_ops);
index 9c3b5e99bcc203d0709e3831573a9ec2515d1654..1dd8e7080098ea61aebf428f8f2635d67177c4d3 100644 (file)
@@ -8408,10 +8408,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_program_breakpoint_here_p (gdbarch,
                                         rs6000_program_breakpoint_here_p);
 
-  /* The value of symbols of type N_SO and N_FUN maybe null when
-     it shouldn't be.  */
-  set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
-
   /* Handles single stepping of atomic sequences.  */
   set_gdbarch_get_next_pcs (gdbarch, ppc_deal_with_atomic_sequence);
 
index 535ae3eea22fa1cf91942a7b5221be1318307321..8545ae60da47c21fd3b29fbbe12f4cae10bc5b1d 100644 (file)
@@ -102,11 +102,6 @@ sol2_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
 void
 sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop, SunPRO)
-     compiler puts out 0 instead of the address in N_SO stabs.  Starting with
-     SunPRO 3.0, the compiler does this for N_FUN stabs too.  */
-  set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
-
   /* Solaris uses SVR4-style shared libraries.  */
   set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);