aboutsummaryrefslogtreecommitdiff
path: root/gdb/corelow.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:33 -0600
commit6be2a9ab1fba5f876c8cb2566280c5e4e6959d6e (patch)
treeb56cebc7b136717accecbf580534524078a6e91c /gdb/corelow.c
parent8ee54925b48985e8e7102221e698bf50b800dd81 (diff)
downloadbinutils-6be2a9ab1fba5f876c8cb2566280c5e4e6959d6e.zip
binutils-6be2a9ab1fba5f876c8cb2566280c5e4e6959d6e.tar.gz
binutils-6be2a9ab1fba5f876c8cb2566280c5e4e6959d6e.tar.bz2
Add target_section constructor
This adds a constructor to target_section, simplifying the code that creates instances of this. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * target-section.h (struct target_section): Add constructor. * exec.c (build_section_table, add_target_sections_of_objfile): Update. * corelow.c (core_target::build_file_mappings): Update.
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index a54d815..4f3c880 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -266,12 +266,7 @@ core_target::build_file_mappings ()
bfd_set_section_alignment (sec, 2);
/* Set target_section fields. */
- m_core_file_mappings.emplace_back ();
- target_section &ts = m_core_file_mappings.back ();
- ts.addr = start;
- ts.endaddr = end;
- ts.owner = nullptr;
- ts.the_bfd_section = sec;
+ m_core_file_mappings.emplace_back (start, end, sec);
});
normalize_mem_ranges (&m_core_unavailable_mappings);