gdb: fix python/lib/gdb/__init__.py formatting
[deliverable/binutils-gdb.git] / gdb / target-section.h
index ff81675d7ebaf80e3136fc3f259650bbc1b92fa1..85d76f7c973092be731edf38ea265827027339a8 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.  */
@@ -42,12 +51,8 @@ struct target_section
   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 */
This page took 0.024013 seconds and 4 git commands to generate.