]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove solib_symbols_extension gdbarch hook
authorTom Tromey <tom@tromey.com>
Sun, 3 Nov 2024 16:49:50 +0000 (09:49 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 7 Feb 2026 14:56:27 +0000 (07:56 -0700)
The solib_symbols_extension gdbarch hook has been obsolete since:

    commit 18b8df43bd11ed314153dff2ef04a4b991f00a7c
    Author: Alan Modra <amodra@gmail.com>
    Date:   Wed Feb 10 12:38:47 2021 +1030

gdb: Remove arm-symbianelf support

This patch removes it.

gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/solib.c

index 63ab7caba317423db80ba3d5324c178b29cde8a7..969ace4de6acec301b3c6d0ec793bf7f49f20f90 100644 (file)
@@ -231,7 +231,6 @@ struct gdbarch
   gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers = default_guess_tracepoint_registers;
   gdbarch_auto_charset_ftype *auto_charset = default_auto_charset;
   gdbarch_auto_wide_charset_ftype *auto_wide_charset = default_auto_wide_charset;
-  const char * solib_symbols_extension = 0;
   int has_dos_based_file_system = 0;
   gdbarch_gen_return_address_ftype *gen_return_address = default_gen_return_address;
   gdbarch_info_proc_ftype *info_proc = nullptr;
@@ -501,7 +500,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of guess_tracepoint_registers, invalid_p == 0.  */
   /* Skip verify of auto_charset, invalid_p == 0.  */
   /* Skip verify of auto_wide_charset, invalid_p == 0.  */
-  /* Skip verify of solib_symbols_extension, invalid_p == 0.  */
   /* Skip verify of has_dos_based_file_system, invalid_p == 0.  */
   /* Skip verify of gen_return_address, invalid_p == 0.  */
   /* Skip verify of info_proc, has predicate.  */
@@ -1280,9 +1278,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
   gdb_printf (file,
              "gdbarch_dump: auto_wide_charset = <%s>\n",
              host_address_to_string (gdbarch->auto_wide_charset));
-  gdb_printf (file,
-             "gdbarch_dump: solib_symbols_extension = %s\n",
-             pstring (gdbarch->solib_symbols_extension));
   gdb_printf (file,
              "gdbarch_dump: has_dos_based_file_system = %s\n",
              plongest (gdbarch->has_dos_based_file_system));
@@ -4931,23 +4926,6 @@ set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
   gdbarch->auto_wide_charset = auto_wide_charset;
 }
 
-const char *
-gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  /* Skip verify of solib_symbols_extension, invalid_p == 0.  */
-  if (gdbarch_debug >= 2)
-    gdb_printf (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
-  return gdbarch->solib_symbols_extension;
-}
-
-void
-set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
-                                    const char * solib_symbols_extension)
-{
-  gdbarch->solib_symbols_extension = solib_symbols_extension;
-}
-
 int
 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
 {
index a98b5b94121095ddeb3af67a1b822a424506d945..04d5d187eddd881cd4385b7d9a9c7ff0e52f7d62 100644 (file)
@@ -1555,16 +1555,6 @@ typedef const char * (gdbarch_auto_wide_charset_ftype) ();
 extern const char * gdbarch_auto_wide_charset (struct gdbarch *gdbarch);
 extern void set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, gdbarch_auto_wide_charset_ftype *auto_wide_charset);
 
-/* If non-empty, this is a file extension that will be opened in place
-   of the file extension reported by the shared library list.
-
-   This is most useful for toolchains that use a post-linker tool,
-   where the names of the files run on the target differ in extension
-   compared to the names of the files GDB should load for debug info. */
-
-extern const char * gdbarch_solib_symbols_extension (struct gdbarch *gdbarch);
-extern void set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, const char * solib_symbols_extension);
-
 /* If true, the target OS has DOS-based file system semantics.  That
    is, absolute paths include a drive name, and the backslash is
    considered a directory separator. */
index 72e75ccc82e89f3c8e814486f653c2eab12019b4..a57ec01e2446fc30365a808374ee5ac6ae691e67 100644 (file)
@@ -2467,21 +2467,6 @@ Return the "auto" target wide charset.
     invalid=False,
 )
 
-Value(
-    comment="""
-If non-empty, this is a file extension that will be opened in place
-of the file extension reported by the shared library list.
-
-This is most useful for toolchains that use a post-linker tool,
-where the names of the files run on the target differ in extension
-compared to the names of the files GDB should load for debug info.
-""",
-    type="const char *",
-    name="solib_symbols_extension",
-    invalid=False,
-    printer="pstring (gdbarch->solib_symbols_extension)",
-)
-
 Value(
     comment="""
 If true, the target OS has DOS-based file system semantics.  That
index 06330de7e91eb295d256539150bab49edf25c2cc..4433019c1442cb487bfbcff35f502b16f711b95c 100644 (file)
@@ -375,33 +375,6 @@ exec_file_find (const char *in_pathname, int *fd)
 gdb::unique_xmalloc_ptr<char>
 solib_find (const char *in_pathname, int *fd)
 {
-  const char *solib_symbols_extension
-    = gdbarch_solib_symbols_extension (current_inferior ()->arch ());
-
-  /* If solib_symbols_extension is set, replace the file's
-     extension.  */
-  if (solib_symbols_extension != NULL)
-    {
-      const char *p = in_pathname + strlen (in_pathname);
-
-      while (p > in_pathname && *p != '.')
-       p--;
-
-      if (*p == '.')
-       {
-         char *new_pathname;
-
-         new_pathname
-           = (char *) alloca (p - in_pathname + 1
-                              + strlen (solib_symbols_extension) + 1);
-         memcpy (new_pathname, in_pathname, p - in_pathname + 1);
-         strcpy (new_pathname + (p - in_pathname) + 1,
-                 solib_symbols_extension);
-
-         in_pathname = new_pathname;
-       }
-    }
-
   return solib_find_1 (in_pathname, fd, true);
 }