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:
Simon Marchi
2023-09-29 22:59:22 -04:00
committed by Simon Marchi
parent c1d21880e9
commit bb86ab837e
23 changed files with 183 additions and 191 deletions

View File

@@ -8018,7 +8018,8 @@ disable_breakpoints_in_shlibs (void)
disabled ones can just stay disabled. */
static void
disable_breakpoints_in_unloaded_shlib (program_space *pspace, so_list *solib)
disable_breakpoints_in_unloaded_shlib (program_space *pspace,
const so_list &solib)
{
bool disabled_shlib_breaks = false;
@@ -8051,7 +8052,7 @@ disable_breakpoints_in_unloaded_shlib (program_space *pspace, so_list *solib)
target_terminal::ours_for_output ();
warning (_("Temporarily disabling breakpoints "
"for unloaded shared library \"%s\""),
solib->so_name);
solib.so_name);
}
disabled_shlib_breaks = true;
}