ld -plugin options when plugins are disabled
[deliverable/binutils-gdb.git] / gdb / symfile.h
index 2dfa6556d47993b32d61979255d66e8b638c3a38..fe79f79a04829e012b2970e65e2e94a646c12df2 100644 (file)
@@ -80,31 +80,28 @@ typedef std::vector<other_sections> section_addr_info;
    each BFD section belongs to.  */
 struct symfile_segment_data
 {
-  ~symfile_segment_data ()
+  struct segment
   {
-    xfree (this->segment_bases);
-    xfree (this->segment_sizes);
-    xfree (this->segment_info);
-  }
+    segment (CORE_ADDR base, CORE_ADDR size)
+      : base (base), size (size)
+    {}
 
-  /* How many segments are present in this file.  If there are
-     two, the text segment is the first one and the data segment
-     is the second one.  */
-  int num_segments = 0;
+    /* The original base address the segment.  */
+    CORE_ADDR base;
 
-  /* If NUM_SEGMENTS is greater than zero, the original base address
-     of each segment.  */
-  CORE_ADDR *segment_bases = nullptr;
+    /* The memory size of the segment.  */
+    CORE_ADDR size;
+  };
 
-  /* If NUM_SEGMENTS is greater than zero, the memory size of each
-     segment.  */
-  CORE_ADDR *segment_sizes = nullptr;
+  /* The segments present in this file.  If there are
+     two, the text segment is the first one and the data segment
+     is the second one.  */
+  std::vector<segment> segments;
 
-  /* If NUM_SEGMENTS is greater than zero, this is an array of entries
-     recording which segment contains each BFD section.
-     SEGMENT_INFO[I] is S+1 if the I'th BFD section belongs to segment
+  /* This is an array of entries recording which segment contains each BFD
+     section.  SEGMENT_INFO[I] is S+1 if the I'th BFD section belongs to segment
      S, or zero if it is not in any segment.  */
-  int *segment_info = nullptr;
+  std::vector<int> segment_info;
 };
 
 using symfile_segment_data_up = std::unique_ptr<symfile_segment_data>;
This page took 0.024867 seconds and 4 git commands to generate.