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.
This commit is contained in:
Tom Tromey
2020-10-29 15:04:33 -06:00
parent 8ee54925b4
commit 6be2a9ab1f
4 changed files with 23 additions and 18 deletions

View File

@ -26,6 +26,15 @@
struct target_section
{
target_section (CORE_ADDR addr_, CORE_ADDR end_, struct bfd_section *sect_,
void *owner_ = nullptr)
: addr (addr_),
endaddr (end_),
the_bfd_section (sect_),
owner (owner_)
{
}
/* Lowest address in section. */
CORE_ADDR addr;
/* Highest address in section, plus 1. */