/* Target sections.
- Copyright (C) 2020 Free Software Foundation, Inc.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
This file is part of GDB.
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. */
void *owner;
};
-/* Holds an array of target sections. Defined by [SECTIONS..SECTIONS_END[. */
+/* Holds an array of target sections. */
-struct target_section_table
-{
- struct target_section *sections;
- struct target_section *sections_end;
-};
+using target_section_table = std::vector<target_section>;
#endif /* GDB_TARGET_SECTION_H */