aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-10-29 15:04:33 -0600
committerTom Tromey <tom@tromey.com>2020-10-29 15:04:40 -0600
commitd9eebde01801427330b882d0104aa608788f268d (patch)
treea3bf28f764d63974498578f4b9e193a0480cbbad /gdb/exec.c
parent3769e2277d352243fa0121d68efe31ae5edc10d5 (diff)
downloadgdb-d9eebde01801427330b882d0104aa608788f268d.zip
gdb-d9eebde01801427330b882d0104aa608788f268d.tar.gz
gdb-d9eebde01801427330b882d0104aa608788f268d.tar.bz2
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.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index a57399b..9c4d9be 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -628,9 +628,8 @@ program_space::add_target_sections (void *owner,
/* Add the sections of OBJFILE to the current set of target sections. */
void
-add_target_sections_of_objfile (struct objfile *objfile)
+program_space::add_target_sections (struct objfile *objfile)
{
- target_section_table *table = &current_program_space->target_sections;
struct obj_section *osect;
gdb_assert (objfile != nullptr);
@@ -641,9 +640,9 @@ add_target_sections_of_objfile (struct objfile *objfile)
if (bfd_section_size (osect->the_bfd_section) == 0)
continue;
- table->emplace_back (obj_section_addr (osect),
- obj_section_endaddr (osect),
- osect->the_bfd_section, (void *) objfile);
+ target_sections.emplace_back (obj_section_addr (osect),
+ obj_section_endaddr (osect),
+ osect->the_bfd_section, (void *) objfile);
}
}