Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 3/3] gdb: remove find_and_open_solib so_list method
Date: Thu, 25 Jul 2024 13:41:37 -0400	[thread overview]
Message-ID: <20240725174514.129360-4-simon.marchi@efficios.com> (raw)
In-Reply-To: <20240725174514.129360-1-simon.marchi@efficios.com>

From: Simon Marchi <simon.marchi@polymtl.ca>

Now that the nto port is removed, this is unused.

Change-Id: I86565310cdbcde17a837eb10585cdd153f4f03d8
---
 gdb/solib-svr4.c | 1 -
 gdb/solib.c      | 7 -------
 gdb/solist.h     | 8 --------
 3 files changed, 16 deletions(-)

diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 9f377f427c87..8c3ff39d2ac0 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -3364,7 +3364,6 @@ const struct solib_ops svr4_so_ops =
   open_symbol_file_object,
   svr4_in_dynsym_resolve_code,
   solib_bfd_open,
-  nullptr,
   svr4_same,
   svr4_keep_data_in_core,
   svr4_update_solib_event_breakpoints,
diff --git a/gdb/solib.c b/gdb/solib.c
index 931fa571be25..49f607514dc7 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -114,7 +114,6 @@ show_solib_search_path (struct ui_file *file, int from_tty,
 static gdb::unique_xmalloc_ptr<char>
 solib_find_1 (const char *in_pathname, int *fd, bool is_solib)
 {
-  const solib_ops *ops = gdbarch_so_ops (current_inferior ()->arch ());
   int found_file = -1;
   gdb::unique_xmalloc_ptr<char> temp_pathname;
   const char *fskind = effective_target_file_system_kind ();
@@ -297,12 +296,6 @@ solib_find_1 (const char *in_pathname, int *fd, bool is_solib)
 			target_lbasename (fskind, in_pathname),
 			O_RDONLY | O_BINARY, &temp_pathname);
 
-  /* If not found, and we're looking for a solib, try to use target
-     supplied solib search method.  */
-  if (is_solib && found_file < 0 && ops->find_and_open_solib)
-    found_file = ops->find_and_open_solib (in_pathname, O_RDONLY | O_BINARY,
-					   &temp_pathname);
-
   /* If not found, next search the inferior's $PATH environment variable.  */
   if (found_file < 0 && sysroot == NULL)
     found_file = openp (current_inferior ()->environment.get ("PATH"),
diff --git a/gdb/solist.h b/gdb/solist.h
index f0d22080de17..6b2a97adf7a7 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -132,14 +132,6 @@ struct solib_ops
   /* Find and open shared library binary file.  */
   gdb_bfd_ref_ptr (*bfd_open) (const char *pathname);
 
-  /* Optional extra hook for finding and opening a solib.
-     If TEMP_PATHNAME is non-NULL: If the file is successfully opened a
-     pointer to a malloc'd and realpath'd copy of SONAME is stored there,
-     otherwise NULL is stored there.  */
-  int (*find_and_open_solib) (const char *soname,
-			      unsigned o_flags,
-			      gdb::unique_xmalloc_ptr<char> *temp_pathname);
-
   /* Given two so_list objects, one from the GDB thread list
      and another from the list returned by current_sos, return 1
      if they represent the same library.
-- 
2.45.2


  parent reply	other threads:[~2024-07-25 17:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25 17:41 [PATCH 0/3] Remove Neutrino support Simon Marchi
2024-07-25 17:41 ` [PATCH 1/3] gdb: remove QNX " Simon Marchi
2024-07-25 17:41 ` [PATCH 2/3] gdbsupport: remove #ifndef REALTIME_LO in signals.cc Simon Marchi
2024-07-25 17:41 ` Simon Marchi [this message]
2024-08-11 17:39 ` [PATCH 0/3] Remove Neutrino support Kevin Buettner
2024-08-12 15:29   ` Simon Marchi

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=20240725174514.129360-4-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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