aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-target.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-target.c')
-rw-r--r--gdb/solib-target.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index 8f73d5d..68dc3cc 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -1,6 +1,6 @@
/* Definitions for targets which report shared library events.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "objfiles.h"
-#include "solist.h"
+#include "solib.h"
#include "symtab.h"
#include "symfile.h"
#include "target.h"
@@ -30,7 +30,7 @@
struct lm_info_target final : public lm_info
{
/* The library's name. The name is normally kept in the struct
- so_list; it is only here during XML parsing. */
+ solib; it is only here during XML parsing. */
std::string name;
/* The target can either specify segment bases or section bases, not
@@ -248,8 +248,8 @@ solib_target_current_sos (void)
auto &new_solib = sos.emplace_back ();
/* We don't need a copy of the name in INFO anymore. */
- new_solib.so_name = std::move (info->name);
- new_solib.so_original_name = new_solib.so_name;
+ new_solib.name = std::move (info->name);
+ new_solib.original_name = new_solib.name;
new_solib.lm_info = std::move (info);
}
@@ -257,12 +257,6 @@ solib_target_current_sos (void)
}
static void
-solib_target_solib_create_inferior_hook (int from_tty)
-{
- /* Nothing needed. */
-}
-
-static void
solib_target_relocate_section_addresses (solib &so, target_section *sec)
{
CORE_ADDR offset;
@@ -291,7 +285,7 @@ solib_target_relocate_section_addresses (solib &so, target_section *sec)
if (num_alloc_sections != li->section_bases.size ())
warning (_("\
Could not relocate shared library \"%s\": wrong number of ALLOC sections"),
- so.so_name.c_str ());
+ so.name.c_str ());
else
{
int bases_index = 0;
@@ -334,7 +328,7 @@ Could not relocate shared library \"%s\": wrong number of ALLOC sections"),
if (data == NULL)
warning (_("\
-Could not relocate shared library \"%s\": no segments"), so.so_name.c_str ());
+Could not relocate shared library \"%s\": no segments"), so.name.c_str ());
else
{
ULONGEST orig_delta;
@@ -345,7 +339,7 @@ Could not relocate shared library \"%s\": no segments"), so.so_name.c_str ());
li->segment_bases.size (),
li->segment_bases.data ()))
warning (_("\
-Could not relocate shared library \"%s\": bad offsets"), so.so_name.c_str ());
+Could not relocate shared library \"%s\": bad offsets"), so.name.c_str ());
/* Find the range of addresses to report for this library in
"info sharedlibrary". Report any consecutive segments
@@ -382,15 +376,7 @@ Could not relocate shared library \"%s\": bad offsets"), so.so_name.c_str ());
sec->endaddr += offset;
}
-static int
-solib_target_open_symbol_file_object (int from_tty)
-{
- /* We can't locate the main symbol file based on the target's
- knowledge; the user has to specify it. */
- return 0;
-}
-
-static int
+static bool
solib_target_in_dynsym_resolve_code (CORE_ADDR pc)
{
/* We don't have a range of addresses for the dynamic linker; there
@@ -404,9 +390,9 @@ const solib_ops solib_target_so_ops =
solib_target_relocate_section_addresses,
nullptr,
nullptr,
- solib_target_solib_create_inferior_hook,
+ nullptr,
solib_target_current_sos,
- solib_target_open_symbol_file_object,
+ nullptr,
solib_target_in_dynsym_resolve_code,
solib_bfd_open,
nullptr,