{
if (is_load)
{
- for (so_list *iter : current_program_space->added_solibs)
+ for (shobj *iter : current_program_space->added_solibs)
{
if (!regex
|| compiled->exec (iter->so_name.c_str (), 0, nullptr, 0) == 0)
current_uiout->text (_(" Inferior loaded "));
ui_out_emit_list list_emitter (current_uiout, "added");
bool first = true;
- for (so_list *iter : current_program_space->added_solibs)
+ for (shobj *iter : current_program_space->added_solibs)
{
if (!first)
current_uiout->text (" ");
disabled ones can just stay disabled. */
static void
-disable_breakpoints_in_unloaded_shlib (program_space *pspace,
- const so_list &solib)
+disable_breakpoints_in_unloaded_shlib (program_space *pspace, const shobj &solib)
{
bool disabled_shlib_breaks = false;
};
static void
-bsd_uthread_solib_loaded (so_list &so)
+bsd_uthread_solib_loaded (shobj &so)
{
const char * const *names = bsd_uthread_solib_names;
}
static void
-bsd_uthread_solib_unloaded (program_space *pspace, const so_list &so)
+bsd_uthread_solib_unloaded (program_space *pspace, const shobj &so)
{
if (bsd_uthread_solib_name.empty ())
return;
struct hppa_objfile_private
{
struct hppa_unwind_info *unwind_info = nullptr; /* a pointer */
- struct so_list *so_info = nullptr; /* a pointer */
+ shobj *so_info = nullptr; /* a pointer */
CORE_ADDR dp = 0;
int dummy_call_sequence_reg = 0;
struct trad_frame_saved_reg;
struct objfile;
-struct so_list;
+struct shobj;
/* Register numbers of various important registers. */
/* These are solib-dependent methods. They are really HPUX only, but
we don't have a HPUX-specific tdep vector at the moment. */
- CORE_ADDR (*solib_thread_start_addr) (struct so_list *so) = nullptr;
+ CORE_ADDR (*solib_thread_start_addr) (shobj *so) = nullptr;
CORE_ADDR (*solib_get_got_by_pc) (CORE_ADDR addr) = nullptr;
CORE_ADDR (*solib_get_solib_by_pc) (CORE_ADDR addr) = nullptr;
CORE_ADDR (*solib_get_text_base) (struct objfile *objfile) = nullptr;
/* See interps.h. */
void
-interps_notify_solib_loaded (const so_list &so)
+interps_notify_solib_loaded (const shobj &so)
{
interps_notify (&interp::on_solib_loaded, so);
}
/* See interps.h. */
void
-interps_notify_solib_unloaded (const so_list &so)
+interps_notify_solib_unloaded (const shobj &so)
{
interps_notify (&interp::on_solib_unloaded, so);
}
class completion_tracker;
struct thread_info;
struct inferior;
-struct so_list;
+struct shobj;
struct trace_state_variable;
typedef struct interp *(*interp_factory_func) (const char *name);
virtual void on_target_resumed (ptid_t ptid) {}
/* Notify the interpreter that solib SO has been loaded. */
- virtual void on_solib_loaded (const so_list &so) {}
+ virtual void on_solib_loaded (const shobj &so) {}
/* Notify the interpreter that solib SO has been unloaded. */
- virtual void on_solib_unloaded (const so_list &so) {}
+ virtual void on_solib_unloaded (const shobj &so) {}
/* Notify the interpreter that a command it is executing is about to cause
the inferior to proceed. */
extern void interps_notify_target_resumed (ptid_t ptid);
/* Notify all interpreters that solib SO has been loaded. */
-extern void interps_notify_solib_loaded (const so_list &so);
+extern void interps_notify_solib_loaded (const shobj &so);
/* Notify all interpreters that solib SO has been unloaded. */
-extern void interps_notify_solib_unloaded (const so_list &so);
+extern void interps_notify_solib_unloaded (const shobj &so);
/* Notify all interpreters that the selected traceframe changed.
/* Print the table header. */
ui_out_emit_list list_emitter (uiout, "shared-libraries");
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
{
if (so.so_name.empty ())
continue;
/* See mi-interp.h. */
void
-mi_output_solib_attribs (ui_out *uiout, const so_list &solib)
+mi_output_solib_attribs (ui_out *uiout, const shobj &solib)
{
gdbarch *gdbarch = current_inferior ()->arch ();
}
void
-mi_interp::on_solib_loaded (const so_list &solib)
+mi_interp::on_solib_loaded (const shobj &solib)
{
ui_out *uiout = this->interp_ui_out ();
}
void
-mi_interp::on_solib_unloaded (const so_list &solib)
+mi_interp::on_solib_unloaded (const shobj &solib)
{
ui_out *uiout = this->interp_ui_out ();
void on_record_changed (inferior *inf, int started, const char *method,
const char *format) override;
void on_target_resumed (ptid_t ptid) override;
- void on_solib_loaded (const so_list &so) override;
- void on_solib_unloaded (const so_list &so) override;
+ void on_solib_loaded (const shobj &so) override;
+ void on_solib_unloaded (const shobj &so) override;
void on_about_to_proceed () override;
void on_traceframe_changed (int tfnum, int tpnum) override;
void on_tsv_created (const trace_state_variable *tsv) override;
/* Output the shared object attributes to UIOUT. */
-void mi_output_solib_attribs (ui_out *uiout, const so_list &solib);
+void mi_output_solib_attribs (ui_out *uiout, const shobj &solib);
/* Returns the INTERP's data cast as mi_interp if INTERP is an MI, and
returns NULL otherwise. */
}
static CORE_ADDR
-lm_addr (const so_list &so)
+lm_addr (const shobj &so)
{
auto *li = gdb::checked_static_cast<const lm_info_svr4 *> (so.lm_info.get ());
}
void
-nto_relocate_section_addresses (so_list &so, target_section *sec)
+nto_relocate_section_addresses (shobj &so, target_section *sec)
{
/* Neutrino treats the l_addr base address field in link.h as different than
the base address in the System V ABI and so the offset needs to be
char **nto_parse_redirection (char *start_argv[], const char **in,
const char **out, const char **err);
-void nto_relocate_section_addresses (so_list &, target_section *);
+void nto_relocate_section_addresses (shobj &, target_section *);
int nto_map_arch_to_cputype (const char *);
#include "target/waitstatus.h"
struct bpstat;
-struct so_list;
+struct shobj;
struct objfile;
struct thread_info;
struct inferior;
/* The shared library specified by SOLIB has been loaded. Note that
when gdb calls this observer, the library's symbols probably
haven't been loaded yet. */
-extern observable<so_list &/* solib */> solib_loaded;
+extern observable<shobj &/* solib */> solib_loaded;
/* The shared library SOLIB has been unloaded from program space PSPACE.
Note when gdb calls this observer, the library's symbols have not
been unloaded yet, and thus are still available. */
-extern observable<program_space *, const so_list &/* solib */> solib_unloaded;
+extern observable<program_space *, const shobj &/* solib */> solib_unloaded;
/* The symbol file specified by OBJFILE has been loaded. */
extern observable<struct objfile */* objfile */> new_objfile;
program_space::free_all_objfiles ()
{
/* Any objfile reference would become stale. */
- for (const struct so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
gdb_assert (so.objfile == NULL);
while (!objfiles_list.empty ())
struct exec;
struct address_space;
struct program_space;
-struct so_list;
+struct shobj;
typedef std::list<std::unique_ptr<objfile>> objfile_list;
struct objfile *objfile_for_address (CORE_ADDR address);
/* Return the list of all the solibs in this program space. */
- intrusive_list<struct so_list> &solibs ()
+ intrusive_list<shobj> &solibs ()
{ return so_list; }
/* Close and clear exec_bfd. If we end up with no target sections
/* List of shared objects mapped into this space. Managed by
solib.c. */
- intrusive_list<struct so_list> so_list;
+ intrusive_list<shobj> so_list;
/* Number of calls to solib_add. */
unsigned int solib_add_generation = 0;
/* When an solib is added, it is also added to this vector. This
is so we can properly report solib changes to the user. */
- std::vector<struct so_list *> added_solibs;
+ std::vector<shobj *> added_solibs;
/* When an solib is removed, its name is added to this vector.
This is so we can properly report solib changes to the user. */
#include "xcoffread.h"
#include "observable.h"
-/* Our private data in struct so_list. */
+/* Our private data in struct shobj. */
struct lm_info_aix final : public lm_info
{
/* Implement the "relocate_section_addresses" target_so_ops method. */
static void
-solib_aix_relocate_section_addresses (so_list &so, target_section *sec)
+solib_aix_relocate_section_addresses (shobj &so, target_section *sec)
{
struct bfd_section *bfd_sect = sec->the_bfd_section;
bfd *abfd = bfd_sect->owner;
/* Implement the "current_sos" target_so_ops method. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
solib_aix_current_sos ()
{
gdb::optional<std::vector<lm_info_aix>> &library_list
if (!library_list.has_value ())
return {};
- intrusive_list<so_list> sos;
+ intrusive_list<shobj> sos;
- /* Build a struct so_list for each entry on the list.
+ /* Build a struct shobj for each entry on the list.
We skip the first entry, since this is the entry corresponding
to the main executable, not a shared library. */
for (int ix = 1; ix < library_list->size (); ix++)
{
- so_list *new_solib = new so_list;
+ shobj *new_solib = new shobj;
std::string so_name;
lm_info_aix &info = (*library_list)[ix];
/* Build a list of currently loaded shared objects. See solib-svr4.c. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
darwin_current_sos ()
{
type *ptr_type
image_info_size = ptr_len * 3;
- intrusive_list<so_list> sos;
+ intrusive_list<shobj> sos;
/* Read infos for each solib.
The first entry was rumored to be the executable itself, but this is not
if (file_path == nullptr)
break;
- /* Create and fill the new so_list element. */
- so_list *newobj = new so_list;
+ /* Create and fill the new struct shobj element. */
+ shobj *newobj = new shobj;
auto li = gdb::make_unique<lm_info_darwin> ();
Relocate these VMAs according to solib info. */
static void
-darwin_relocate_section_addresses (so_list &so, target_section *sec)
+darwin_relocate_section_addresses (shobj &so, target_section *sec)
{
auto *li = gdb::checked_static_cast<lm_info_darwin *> (so.lm_info.get ());
}
-/* Build a list of `struct so_list' objects describing the shared
+/* Build a list of `struct shobj' objects describing the shared
objects currently loaded in the inferior. This list does not
include an entry for the main executable file.
Note that we only gather information directly available from the
inferior --- we don't examine any of the shared library files
- themselves. The declaration of `struct so_list' says which fields
+ themselves. The declaration of `struct shobj' says which fields
we provide values for. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
dsbt_current_sos (void)
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
CORE_ADDR lm_addr;
dsbt_info *info = get_dsbt_info (current_program_space);
- intrusive_list<so_list> sos;
+ intrusive_list<shobj> sos;
/* Make sure that the main executable has been relocated. This is
required in order to find the address of the global offset table,
break;
}
- so_list *sop = new so_list;
+ shobj *sop = new shobj;
auto li = gdb::make_unique<lm_info_dsbt> ();
li->map = loadmap;
/* Fetch the name. */
}
static void
-dsbt_relocate_section_addresses (so_list &so, target_section *sec)
+dsbt_relocate_section_addresses (shobj &so, target_section *sec)
{
int seg;
auto *li = gdb::checked_static_cast<lm_info_dsbt *> (so.lm_info.get ());
/* Implement the "current_sos" target_so_ops method. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
frv_current_sos ()
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
CORE_ADDR lm_addr, mgot;
- intrusive_list<so_list> sos;
+ intrusive_list<shobj> sos;
/* Make sure that the main executable has been relocated. This is
required in order to find the address of the global offset table,
break;
}
- so_list *sop = new so_list;
+ shobj *sop = new shobj;
auto li = gdb::make_unique<lm_info_frv> ();
li->map = loadmap;
li->got_value = got_addr;
}
static void
-frv_relocate_section_addresses (so_list &so, target_section *sec)
+frv_relocate_section_addresses (shobj &so, target_section *sec)
{
int seg;
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
CORE_ADDR
frv_fdpic_find_global_pointer (CORE_ADDR addr)
{
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
{
int seg;
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
in list of shared objects. */
if (addr == 0)
{
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
{
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
/* The other link map addresses may be found by examining the list
of shared libraries. */
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
{
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
/* Relocate section addresses. */
static void
-rocm_solib_relocate_section_addresses (so_list &so,
+rocm_solib_relocate_section_addresses (shobj &so,
struct target_section *sec)
{
if (!is_amdgpu_arch (gdbarch_from_bfd (so.abfd.get ())))
/* Create so_list objects from rocm_so objects in SOS. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
so_list_from_rocm_sos (const std::vector<rocm_so> &sos)
{
- intrusive_list<so_list> dst;
+ intrusive_list<shobj> dst;
for (const rocm_so &so : sos)
{
- so_list *newobj = new so_list;
+ struct shobj *newobj = new struct shobj;
newobj->lm_info = gdb::make_unique<lm_info_svr4> (*so.lm_info);
newobj->so_name = so.name;
return dst;
}
-/* Build a list of `struct so_list' objects describing the shared
+/* Build a list of `struct shobj' objects describing the shared
objects currently loaded in the inferior. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
rocm_solib_current_sos ()
{
/* First, retrieve the host-side shared library list. */
- intrusive_list<so_list> sos = svr4_so_ops.current_sos ();
+ intrusive_list<shobj> sos = svr4_so_ops.current_sos ();
/* Then, the device-side shared library list. */
std::vector<rocm_so> &dev_sos = get_solib_info (current_inferior ())->solib_list;
if (dev_sos.empty ())
return sos;
- intrusive_list<so_list> dev_so_list = so_list_from_rocm_sos (dev_sos);
+ intrusive_list<shobj> dev_so_list = so_list_from_rocm_sos (dev_sos);
if (sos.empty ())
return dev_so_list;
}
static int
-svr4_same (const so_list &gdb, const so_list &inferior)
+svr4_same (const shobj &gdb, const shobj &inferior)
{
auto *lmg
= gdb::checked_static_cast<const lm_info_svr4 *> (gdb.lm_info.get ());
}
static CORE_ADDR
-lm_addr_check (const so_list &so, bfd *abfd)
+lm_addr_check (const shobj &so, bfd *abfd)
{
auto *li = gdb::checked_static_cast<lm_info_svr4 *> (so.lm_info.get ());
/* Implement target_so_ops.clear_so. */
static void
-svr4_clear_so (const so_list &so)
+svr4_clear_so (const shobj &so)
{
auto *li = gdb::checked_static_cast<lm_info_svr4 *> (so.lm_info.get ());
/* Create the so_list objects equivalent to the svr4_sos in SOS. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
so_list_from_svr4_sos (const std::vector<svr4_so> &sos)
{
- intrusive_list<so_list> dst;
+ intrusive_list<shobj> dst;
for (const svr4_so &so : sos)
{
- so_list *newobj = new so_list;
+ struct shobj *newobj = new struct shobj;
newobj->so_name = so.name;
newobj->so_original_name = so.name;
/* If no shared library information is available from the dynamic
linker, build a fallback list from other sources. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
svr4_default_sos (svr4_info *info)
{
if (!info->debug_loader_offset_p)
return {};
- so_list *newobj = new so_list;
+ shobj *newobj = new shobj;
auto li = gdb::make_unique<lm_info_svr4> ();
/* Nothing will ever check the other fields if we set l_addr_p. */
newobj->so_name = info->debug_loader_name;
newobj->so_original_name = newobj->so_name;
- intrusive_list<so_list> sos;
+ intrusive_list<shobj> sos;
sos.push_back (*newobj);
return sos;
/* Collect sos read and stored by the probes interface. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
svr4_collect_probes_sos (svr4_info *info)
{
- intrusive_list<so_list> res;
+ intrusive_list<shobj> res;
for (const auto &tuple : info->solib_lists)
{
/* Implement the main part of the "current_sos" target_so_ops
method. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
svr4_current_sos_1 (svr4_info *info)
{
- intrusive_list<so_list> sos;
+ intrusive_list<shobj> sos;
/* If we're using the probes interface, we can use the cache as it will
be maintained by probe update/reload actions. */
/* Implement the "current_sos" target_so_ops method. */
-static intrusive_list<so_list>
+static intrusive_list<shobj>
svr4_current_sos ()
{
svr4_info *info = get_svr4_info (current_program_space);
- intrusive_list<so_list> sos = svr4_current_sos_1 (info);
+ intrusive_list<shobj> sos = svr4_current_sos_1 (info);
struct mem_range vsyscall_range;
/* Filter out the vDSO module, if present. Its symbol file would
/* The other link map addresses may be found by examining the list
of shared libraries. */
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
if (so.objfile == objfile)
{
auto *li
/* On a running target, we can get the dynamic linker's base
address from the shared library table. */
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
{
if (svr4_same_1 (interp_name, so.so_original_name.c_str ()))
{
static void
-svr4_relocate_section_addresses (so_list &so, target_section *sec)
+svr4_relocate_section_addresses (shobj &so, target_section *sec)
{
bfd *abfd = sec->the_bfd_section->owner;
/* Return the DSO matching OBJFILE or nullptr if none can be found. */
-static const so_list *
+static const shobj *
find_solib_for_objfile (struct objfile *objfile)
{
if (objfile == nullptr)
if (objfile->separate_debug_objfile_backlink != nullptr)
objfile = objfile->separate_debug_objfile_backlink;
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
if (so.objfile == objfile)
return &so;
right thing for the main executable. */
static CORE_ADDR
-find_debug_base_for_solib (const so_list *solib)
+find_debug_base_for_solib (const shobj *solib)
{
if (solib == nullptr)
return 0;
/* The linker namespace to iterate identified by the address of its
r_debug object, defaulting to the initial namespace. */
CORE_ADDR initial = elf_locate_base ();
- const so_list *curr_solib = find_solib_for_objfile (current_objfile);
+ const shobj *curr_solib = find_solib_for_objfile (current_objfile);
CORE_ADDR debug_base = find_debug_base_for_solib (curr_solib);
if (debug_base == 0)
debug_base = initial;
If we fail, e.g. for manually added symbol files or for the main
executable, we assume that they were added to the initial
namespace. */
- const so_list *solib = find_solib_for_objfile (objfile);
+ const shobj *solib = find_solib_for_objfile (objfile);
CORE_ADDR solib_base = find_debug_base_for_solib (solib);
if (solib_base == 0)
solib_base = initial;
}
#endif
-static intrusive_list<so_list>
+static intrusive_list<shobj>
solib_target_current_sos (void)
{
- intrusive_list<so_list> sos;
+ intrusive_list<shobj> sos;
/* Fetch the list of shared libraries. */
gdb::optional<gdb::char_vector> library_document
std::vector<lm_info_target_up> library_list
= solib_target_parse_libraries (library_document->data ());
- /* Build a struct so_list for each entry on the list. */
+ /* Build a struct shobj for each entry on the list. */
for (lm_info_target_up &info : library_list)
{
- so_list *new_solib = new so_list;
+ shobj *new_solib = new shobj;
/* We don't need a copy of the name in INFO anymore. */
new_solib->so_name = std::move (info->name);
}
static void
-solib_target_relocate_section_addresses (so_list &so, target_section *sec)
+solib_target_relocate_section_addresses (shobj &so, target_section *sec)
{
CORE_ADDR offset;
auto *li = gdb::checked_static_cast<lm_info_target *> (so.lm_info.get ());
expansion stuff?). */
static int
-solib_map_sections (so_list &so)
+solib_map_sections (shobj &so)
{
const target_so_ops *ops = gdbarch_so_ops (current_inferior ()->arch ());
/* See solist.h. */
void
-so_list::clear ()
+shobj::clear ()
{
const target_so_ops *ops = gdbarch_so_ops (current_inferior ()->arch ());
be chatty about it. Return true if any symbols were actually loaded. */
bool
-solib_read_symbols (so_list &so, symfile_add_flags flags)
+solib_read_symbols (shobj &so, symfile_add_flags flags)
{
if (so.symbols_loaded)
{
in the list of shared libraries. Return false otherwise. */
static bool
-solib_used (const so_list &known)
+solib_used (const shobj &known)
{
- for (const so_list &pivot : current_program_space->solibs ())
+ for (const shobj &pivot : current_program_space->solibs ())
if (&pivot != &known && pivot.objfile == known.objfile)
return true;
return false;
/* Notify interpreters and observers that solib SO has been loaded. */
static void
-notify_solib_loaded (so_list &so)
+notify_solib_loaded (shobj &so)
{
interps_notify_solib_loaded (so);
gdb::observers::solib_loaded.notify (so);
/* Notify interpreters and observers that solib SO has been unloaded. */
static void
-notify_solib_unloaded (program_space *pspace, const so_list &so)
+notify_solib_unloaded (program_space *pspace, const shobj &so)
{
interps_notify_solib_unloaded (so);
gdb::observers::solib_unloaded.notify (pspace, so);
the time we're done walking GDB's list, the inferior's list
contains only the new shared objects, which we then add. */
- intrusive_list<so_list> inferior = ops->current_sos ();
- intrusive_list<so_list>::iterator gdb_iter
+ intrusive_list<shobj> inferior = ops->current_sos ();
+ intrusive_list<shobj>::iterator gdb_iter
= current_program_space->so_list.begin ();
while (gdb_iter != current_program_space->so_list.end ())
{
- intrusive_list<so_list>::iterator inferior_iter = inferior.begin ();
+ intrusive_list<shobj>::iterator inferior_iter = inferior.begin ();
/* Check to see whether the shared object *gdb also appears in
the inferior's current list. */
current_program_space->deleted_solibs.push_back (gdb_iter->so_name);
- intrusive_list<so_list>::iterator gdb_iter_next
+ intrusive_list<shobj>::iterator gdb_iter_next
= current_program_space->so_list.erase (gdb_iter);
/* Unless the user loaded it explicitly, free SO's objfile. */
int not_found = 0;
const char *not_found_filename = NULL;
- /* Fill in the rest of each of the `struct so_list' nodes. */
- for (so_list &new_so : inferior)
+ /* Fill in the rest of each of the `so' nodes. */
+ for (shobj &new_so : inferior)
{
current_program_space->added_solibs.push_back (&new_so);
try
{
- /* Fill in the rest of the `struct so_list' node. */
+ /* Fill in the rest of the `struct shobj' node. */
if (!solib_map_sections (new_so))
{
not_found++;
/* Return non-zero if SO is the libpthread shared library. */
static bool
-libpthread_solib_p (const so_list &so)
+libpthread_solib_p (const shobj &so)
{
return libpthread_name_p (so.so_name.c_str ());
}
if (from_tty)
add_flags |= SYMFILE_VERBOSE;
- for (so_list &gdb : current_program_space->solibs ())
+ for (shobj &gdb : current_program_space->solibs ())
if (! pattern || re_exec (gdb.so_name.c_str ()))
{
/* Normally, we would read the symbols from that library
so we need to make two passes over the libs. */
nr_libs = 0;
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
{
if (!so.so_name.empty ())
{
uiout->table_body ();
- for (const so_list &so : current_program_space->solibs ())
+ for (const shobj &so : current_program_space->solibs ())
{
if (so.so_name.empty ())
continue;
/* See solib.h. */
bool
-solib_contains_address_p (const so_list &solib,
- CORE_ADDR address)
+solib_contains_address_p (const shobj &solib, CORE_ADDR address)
{
for (const target_section &p : solib.sections)
if (p.addr <= address && address < p.endaddr)
const char *
solib_name_from_address (struct program_space *pspace, CORE_ADDR address)
{
- for (const so_list &so : pspace->so_list)
+ for (const shobj &so : pspace->so_list)
if (solib_contains_address_p (so, address))
return so.so_name.c_str ();
disable_breakpoints_in_shlibs ();
- current_program_space->so_list.clear_and_dispose ([] (so_list *so)
+ current_program_space->so_list.clear_and_dispose ([] (shobj *so)
{
notify_solib_unloaded (current_program_space, *so);
current_program_space->remove_target_sections (&so);
if (print_symbol_loading_p (from_tty, 0, 0))
gdb_printf (_("Loading symbols for shared libraries.\n"));
- for (so_list &so : current_program_space->solibs ())
+ for (shobj &so : current_program_space->solibs ())
{
const char *found_pathname = NULL;
bool was_loaded = so.symbols_loaded != 0;
{
if (objfile != 0 && objfile->flags & OBJF_USERLOADED)
{
- for (so_list &so : objfile->pspace->solibs ())
+ for (shobj &so : objfile->pspace->solibs ())
if (so.objfile == objfile)
so.objfile = nullptr;
}
#define SOLIB_H
/* Forward decl's for prototypes */
-struct so_list;
+struct shobj;
struct target_ops;
struct target_so_ops;
struct program_space;
/* Called to add symbols from a shared library to gdb's symbol table. */
extern void solib_add (const char *, int, int);
-extern bool solib_read_symbols (so_list &, symfile_add_flags);
+extern bool solib_read_symbols (shobj &, symfile_add_flags);
/* Function to be called when the inferior starts up, to discover the
names of shared libraries that are dynamically linked, the base
/* Return true if ADDR lies within SOLIB. */
-extern bool solib_contains_address_p (const so_list &, CORE_ADDR);
+extern bool solib_contains_address_p (const shobj &, CORE_ADDR);
/* Return whether the data starting at VADDR, size SIZE, must be kept
in a core file for shared libraries loaded before "gcore" is used
using lm_info_up = std::unique_ptr<lm_info>;
-struct so_list : intrusive_list_node<so_list>
+struct shobj : intrusive_list_node<shobj>
{
/* Free symbol-file related contents of SO and reset for possible reloading
of SO. If we have opened a BFD for SO, close it. If we have placed SO's
{
/* Adjust the section binding addresses by the base address at
which the object was actually mapped. */
- void (*relocate_section_addresses) (so_list &so, target_section *);
+ void (*relocate_section_addresses) (shobj &so, target_section *);
/* Reset private data structures associated with SO.
This is called when SO is about to be reloaded.
It is also called when SO is about to be freed. */
- void (*clear_so) (const so_list &so);
+ void (*clear_so) (const shobj &so);
/* Free private data structures associated to PSPACE. This method
should not free resources associated to individual so_list entries,
Note that we only gather information directly available from the
inferior --- we don't examine any of the shared library files
- themselves. The declaration of `struct so_list' says which fields
+ themselves. The declaration of `struct shobj' says which fields
we provide values for. */
- intrusive_list<so_list> (*current_sos) ();
+ intrusive_list<shobj> (*current_sos) ();
/* Find, open, and read the symbols for the main executable. If
FROM_TTY is non-zero, allow messages to be printed. */
if they represent the same library.
Falls back to using strcmp on so_original_name field when set
to NULL. */
- int (*same) (const so_list &gdb, const so_list &inferior);
+ int (*same) (const shobj &gdb, const shobj &inferior);
/* Return whether a region of memory must be kept in a core file
for shared libraries loaded before "gcore" is used to be
};
/* A unique pointer to a so_list. */
-using so_list_up = std::unique_ptr<so_list>;
+using shobj_up = std::unique_ptr<shobj>;
/* Find main executable binary file. */
extern gdb::unique_xmalloc_ptr<char> exec_file_find (const char *in_pathname,