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/nto-tdep.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/nto-tdep.c')
-rw-r--r-- | gdb/nto-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c index 9ece8b5..1d9c734 100644 --- a/gdb/nto-tdep.c +++ b/gdb/nto-tdep.c @@ -245,9 +245,9 @@ nto_parse_redirection (char *pargv[], const char **pin, const char **pout, } static CORE_ADDR -lm_addr (struct so_list *so) +lm_addr (const so_list &so) { - lm_info_svr4 *li = (lm_info_svr4 *) so->lm_info; + const lm_info_svr4 *li = (const lm_info_svr4 *) so.lm_info; return li->l_addr; } @@ -283,7 +283,7 @@ find_load_phdr (bfd *abfd) } void -nto_relocate_section_addresses (struct so_list *so, struct target_section *sec) +nto_relocate_section_addresses (so_list &so, target_section *sec) { /* Neutrino treats the l_addr base address field in link.h as different than the base address in the System V ABI and so the offset needs to be |