From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>, Alan Modra <amodra@gmail.com>
Subject: [PATCH 3/6] Remove solib_symbols_extension gdbarch hook
Date: Mon, 04 Nov 2024 14:14:13 -0700 [thread overview]
Message-ID: <20241104-check-unused-gdbarch-v1-3-7082f2121077@tromey.com> (raw)
In-Reply-To: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com>
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 | 22 ----------------------
gdb/gdbarch-gen.h | 10 ----------
gdb/gdbarch_components.py | 15 ---------------
gdb/solib.c | 27 ---------------------------
4 files changed, 74 deletions(-)
diff --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c
index e50bb1e9a819fe8e2a0219314fe939eb307e4424..3d3261f636aa8da6cdd3412d76a469eb6059aafd 100644
--- a/gdb/gdbarch-gen.c
+++ b/gdb/gdbarch-gen.c
@@ -232,7 +232,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. */
@@ -1281,9 +1279,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));
@@ -4940,23 +4935,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)
{
diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h
index 582c682de21412b6ead55280fc936c2ce37ee4b7..0a5a168f21070b5f3baefee217eb6838791a71bb 100644
--- a/gdb/gdbarch-gen.h
+++ b/gdb/gdbarch-gen.h
@@ -1541,16 +1541,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. */
diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py
index 1c7a0aea35e40fe4b05349ee7815ba92a82bda7a..262d448b6c7130728f21afd4b55c9412553a32fb 100644
--- a/gdb/gdbarch_components.py
+++ b/gdb/gdbarch_components.py
@@ -2443,21 +2443,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
diff --git a/gdb/solib.c b/gdb/solib.c
index 5c926def715080f3ab54172afcabc3361f15ceb0..91404f6c69c64bde645e64252429a9b840c9bec6 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -377,33 +377,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);
}
--
2.46.1
next prev parent reply other threads:[~2024-11-04 21:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 21:14 [PATCH 0/6] Add gdbarch-checking script Tom Tromey
2024-11-04 21:14 ` [PATCH 1/6] Add check-gdbarch.py Tom Tromey
2024-12-05 22:47 ` Keith Seitz
2024-11-04 21:14 ` [PATCH 2/6] Use 'invalid' rather than 'predicate' in some gdbarch functions Tom Tromey
2024-11-04 21:14 ` Tom Tromey [this message]
2024-11-04 21:14 ` [PATCH 4/6] Remove skip_permanent_breakpoint gdbarch hook Tom Tromey
2024-11-04 21:14 ` [PATCH 5/6] Remove the print_vector_info " Tom Tromey
2024-12-05 22:49 ` Keith Seitz
2024-11-04 21:14 ` [PATCH 6/6] Remove the auto_charset " Tom Tromey
2024-12-05 22:50 ` [PATCH 0/6] Add gdbarch-checking script Keith Seitz
2024-12-06 2:58 ` Sergio Durigan Junior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241104-check-unused-gdbarch-v1-3-7082f2121077@tromey.com \
--to=tom@tromey.com \
--cc=amodra@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox