aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-aix.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-09-29 22:59:22 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-19 10:57:51 -0400
commitbb86ab837e3c4eac98dba5618bf01894dd6b502a (patch)
tree1ae7227a5e21b5adc9f67e8ae187360c2818a043 /gdb/solib-aix.c
parentc1d21880e981f3f890a74cd9d133e82b26c32818 (diff)
downloadgdb-bb86ab837e3c4eac98dba5618bf01894dd6b502a.zip
gdb-bb86ab837e3c4eac98dba5618bf01894dd6b502a.tar.gz
gdb-bb86ab837e3c4eac98dba5618bf01894dd6b502a.tar.bz2
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>
Diffstat (limited to 'gdb/solib-aix.c')
-rw-r--r--gdb/solib-aix.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c
index 0b6ad83..cfcc04d 100644
--- a/gdb/solib-aix.c
+++ b/gdb/solib-aix.c
@@ -311,13 +311,12 @@ solib_aix_bss_data_overlap (bfd *abfd)
/* Implement the "relocate_section_addresses" target_so_ops method. */
static void
-solib_aix_relocate_section_addresses (struct so_list *so,
- struct target_section *sec)
+solib_aix_relocate_section_addresses (so_list &so, target_section *sec)
{
struct bfd_section *bfd_sect = sec->the_bfd_section;
bfd *abfd = bfd_sect->owner;
const char *section_name = bfd_section_name (bfd_sect);
- lm_info_aix *info = (lm_info_aix *) so->lm_info;
+ lm_info_aix *info = (lm_info_aix *) so.lm_info;
if (strcmp (section_name, ".text") == 0)
{
@@ -364,11 +363,11 @@ solib_aix_relocate_section_addresses (struct so_list *so,
/* Implement the "free_so" target_so_ops method. */
static void
-solib_aix_free_so (struct so_list *so)
+solib_aix_free_so (so_list &so)
{
- lm_info_aix *li = (lm_info_aix *) so->lm_info;
+ lm_info_aix *li = (lm_info_aix *) so.lm_info;
- solib_debug_printf ("%s", so->so_name);
+ solib_debug_printf ("%s", so.so_name);
delete li;
}