Change add_target_sections_of_objfile to method on program_space
This changes add_target_sections_of_objfile to be a method on
program_space. It is renamed to be another overload of
add_target_sections, because they are semantically equivalent in a
sense.
gdb/ChangeLog
2020-10-29 Tom Tromey <tom@tromey.com>
* symfile.c (add_symbol_file_command): Update.
* exec.c (program_space::add_target_sections): Rename.
* symfile-mem.c (symbol_file_add_from_memory): Update.
* progspace.h (struct program_space) <add_target_sections>:
Declare new overload.
* exec.h (add_target_sections_of_objfile): Don't declare.