aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-frv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-frv.c')
-rw-r--r--gdb/solib-frv.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 39508fa..25873e6 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -264,7 +264,6 @@ static CORE_ADDR
lm_base (void)
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
- struct bound_minimal_symbol got_sym;
CORE_ADDR addr;
gdb_byte buf[FRV_PTR_SIZE];
@@ -280,8 +279,9 @@ lm_base (void)
if (lm_base_cache)
return lm_base_cache;
- got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
- current_program_space->symfile_object_file);
+ bound_minimal_symbol got_sym
+ = lookup_minimal_symbol (current_program_space, "_GLOBAL_OFFSET_TABLE_",
+ current_program_space->symfile_object_file);
if (got_sym.minsym == 0)
{
solib_debug_printf ("_GLOBAL_OFFSET_TABLE_ not found.");
@@ -306,12 +306,12 @@ lm_base (void)
/* Implement the "current_sos" solib_ops method. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
frv_current_sos ()
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
CORE_ADDR lm_addr, mgot;
- intrusive_list<solib> sos;
+ owning_intrusive_list<solib> sos;
/* Make sure that the main executable has been relocated. This is
required in order to find the address of the global offset table,
@@ -377,11 +377,13 @@ frv_current_sos ()
break;
}
- solib *sop = new solib;
+ auto &sop = sos.emplace_back ();
auto li = std::make_unique<lm_info_frv> ();
li->map = loadmap;
li->got_value = got_addr;
li->lm_addr = lm_addr;
+ sop.lm_info = std::move (li);
+
/* Fetch the name. */
addr = extract_unsigned_integer (lm_buf.l_name,
sizeof (lm_buf.l_name),
@@ -395,11 +397,9 @@ frv_current_sos ()
warning (_("Can't read pathname for link map entry."));
else
{
- sop->so_name = name_buf.get ();
- sop->so_original_name = sop->so_name;
+ sop.so_name = name_buf.get ();
+ sop.so_original_name = sop.so_name;
}
-
- sos.push_back (*sop);
}
else
{
@@ -687,7 +687,7 @@ enable_break (void)
return 0;
}
- if (!entry_point_address_query (&entry_point))
+ if (!entry_point_address_query (current_program_space, &entry_point))
{
solib_debug_printf ("Symbol file has no entry point.");
return 0;
@@ -838,10 +838,10 @@ frv_relocate_section_addresses (solib &so, target_section *sec)
static CORE_ADDR
main_got (void)
{
- struct bound_minimal_symbol got_sym;
-
objfile *objf = current_program_space->symfile_object_file;
- got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
+ bound_minimal_symbol got_sym
+ = lookup_minimal_symbol (current_program_space, "_GLOBAL_OFFSET_TABLE_",
+ objf);
if (got_sym.minsym == 0)
return 0;
@@ -1084,4 +1084,9 @@ const solib_ops frv_so_ops =
open_symbol_file_object,
frv_in_dynsym_resolve_code,
solib_bfd_open,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ default_find_solib_addr,
};