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-frv.c | |
parent | c1d21880e981f3f890a74cd9d133e82b26c32818 (diff) | |
download | fsf-binutils-gdb-bb86ab837e3c4eac98dba5618bf01894dd6b502a.zip fsf-binutils-gdb-bb86ab837e3c4eac98dba5618bf01894dd6b502a.tar.gz fsf-binutils-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-frv.c')
-rw-r--r-- | gdb/solib-frv.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index c61ed79..c895eb2 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -817,19 +817,18 @@ frv_clear_solib (program_space *pspace) } static void -frv_free_so (struct so_list *so) +frv_free_so (so_list &so) { - lm_info_frv *li = (lm_info_frv *) so->lm_info; + lm_info_frv *li = (lm_info_frv *) so.lm_info; delete li; } static void -frv_relocate_section_addresses (struct so_list *so, - struct target_section *sec) +frv_relocate_section_addresses (so_list &so, target_section *sec) { int seg; - lm_info_frv *li = (lm_info_frv *) so->lm_info; + lm_info_frv *li = (lm_info_frv *) so.lm_info; int_elf32_fdpic_loadmap *map = li->map; for (seg = 0; seg < map->nsegs; seg++) |