mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
gdb: replace some so_list parameters to use references
A subsequent patch changes so_list to be linked using intrusive_list. Iterating an intrusive_list yields some references to the list elements. Convert some functions accepting so_list objects to take references, to make things easier and more natural. Add const where possible and convenient. Change-Id: Id5ab5339c3eb6432e809ad14782952d6a45806f3 Approved-By: Pedro Alves <pedro@palves.net> Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
This commit is contained in:
committed by
Simon Marchi
parent
c1d21880e9
commit
bb86ab837e
@@ -275,19 +275,19 @@ static const char * const bsd_uthread_solib_names[] =
|
||||
};
|
||||
|
||||
static void
|
||||
bsd_uthread_solib_loaded (struct so_list *so)
|
||||
bsd_uthread_solib_loaded (so_list &so)
|
||||
{
|
||||
const char * const *names = bsd_uthread_solib_names;
|
||||
|
||||
for (names = bsd_uthread_solib_names; *names; names++)
|
||||
{
|
||||
if (startswith (so->so_original_name, *names))
|
||||
if (startswith (so.so_original_name, *names))
|
||||
{
|
||||
solib_read_symbols (so, 0);
|
||||
|
||||
if (bsd_uthread_activate (so->objfile))
|
||||
if (bsd_uthread_activate (so.objfile))
|
||||
{
|
||||
bsd_uthread_solib_name = so->so_original_name;
|
||||
bsd_uthread_solib_name = so.so_original_name;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -295,12 +295,12 @@ bsd_uthread_solib_loaded (struct so_list *so)
|
||||
}
|
||||
|
||||
static void
|
||||
bsd_uthread_solib_unloaded (program_space *pspace, so_list *so)
|
||||
bsd_uthread_solib_unloaded (program_space *pspace, const so_list &so)
|
||||
{
|
||||
if (!bsd_uthread_solib_name)
|
||||
return;
|
||||
|
||||
if (strcmp (so->so_original_name, bsd_uthread_solib_name) == 0)
|
||||
if (strcmp (so.so_original_name, bsd_uthread_solib_name) == 0)
|
||||
bsd_uthread_deactivate ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user