diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-09-29 22:59:22 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-10-19 10:57:51 -0400 |
commit | bb86ab837e3c4eac98dba5618bf01894dd6b502a (patch) | |
tree | 1ae7227a5e21b5adc9f67e8ae187360c2818a043 /gdb/solib-rocm.c | |
parent | c1d21880e981f3f890a74cd9d133e82b26c32818 (diff) | |
download | gdb-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-rocm.c')
-rw-r--r-- | gdb/solib-rocm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/solib-rocm.c b/gdb/solib-rocm.c index b24d0e8..65dd1c0 100644 --- a/gdb/solib-rocm.c +++ b/gdb/solib-rocm.c @@ -153,7 +153,7 @@ rocm_free_solib_list (struct solib_info *info) { struct so_list *next = info->solib_list->next; - free_so (info->solib_list); + free_so (*info->solib_list); info->solib_list = next; } @@ -177,16 +177,16 @@ get_solib_info (inferior *inf) /* Relocate section addresses. */ static void -rocm_solib_relocate_section_addresses (struct so_list *so, +rocm_solib_relocate_section_addresses (so_list &so, struct target_section *sec) { - if (!is_amdgpu_arch (gdbarch_from_bfd (so->abfd))) + if (!is_amdgpu_arch (gdbarch_from_bfd (so.abfd))) { svr4_so_ops.relocate_section_addresses (so, sec); return; } - lm_info_svr4 *li = (lm_info_svr4 *) so->lm_info; + lm_info_svr4 *li = (lm_info_svr4 *) so.lm_info; sec->addr = sec->addr + li->l_addr; sec->endaddr = sec->endaddr + li->l_addr; } |