Constify some target_so_ops instances
This changes some target_so_ops instances to be const. This makes their use a little more obvious (they can't be mutated) and also allows for the removal of some initialization code.
This commit is contained in:
parent
9e468e953c
commit
549dfc51b0
13 changed files with 112 additions and 88 deletions
|
@ -718,25 +718,23 @@ show_solib_aix_debug (struct ui_file *file, int from_tty,
|
|||
}
|
||||
|
||||
/* The target_so_ops for AIX targets. */
|
||||
struct target_so_ops solib_aix_so_ops;
|
||||
const struct target_so_ops solib_aix_so_ops =
|
||||
{
|
||||
solib_aix_relocate_section_addresses,
|
||||
solib_aix_free_so,
|
||||
nullptr,
|
||||
solib_aix_clear_solib,
|
||||
solib_aix_solib_create_inferior_hook,
|
||||
solib_aix_current_sos,
|
||||
solib_aix_open_symbol_file_object,
|
||||
solib_aix_in_dynsym_resolve_code,
|
||||
solib_aix_bfd_open,
|
||||
};
|
||||
|
||||
void _initialize_solib_aix ();
|
||||
void
|
||||
_initialize_solib_aix ()
|
||||
{
|
||||
solib_aix_so_ops.relocate_section_addresses
|
||||
= solib_aix_relocate_section_addresses;
|
||||
solib_aix_so_ops.free_so = solib_aix_free_so;
|
||||
solib_aix_so_ops.clear_solib = solib_aix_clear_solib;
|
||||
solib_aix_so_ops.solib_create_inferior_hook
|
||||
= solib_aix_solib_create_inferior_hook;
|
||||
solib_aix_so_ops.current_sos = solib_aix_current_sos;
|
||||
solib_aix_so_ops.open_symbol_file_object
|
||||
= solib_aix_open_symbol_file_object;
|
||||
solib_aix_so_ops.in_dynsym_resolve_code
|
||||
= solib_aix_in_dynsym_resolve_code;
|
||||
solib_aix_so_ops.bfd_open = solib_aix_bfd_open;
|
||||
|
||||
gdb::observers::normal_stop.attach (solib_aix_normal_stop_observer,
|
||||
"solib-aix");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue