diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-19 12:18:05 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-19 12:18:36 -0400 |
commit | 9005fbbb0023f212fcd797227b839f21cb8bf0a1 (patch) | |
tree | 12437fdcf47ab41839ad4e9a76430a826698b853 /gdb/symfile.h | |
parent | 68b888fff3164b5e8e347d9c1ca351c366f0aac4 (diff) | |
download | gdb-9005fbbb0023f212fcd797227b839f21cb8bf0a1.zip gdb-9005fbbb0023f212fcd797227b839f21cb8bf0a1.tar.gz gdb-9005fbbb0023f212fcd797227b839f21cb8bf0a1.tar.bz2 |
gdb: make symfile_segment_data::segment_info an std::vector
Change the symfile_segment_data::segment_info array to be an
std::vector. No functional changes are expected.
gdb/ChangeLog:
* symfile.h (struct symfile_segment_data)
<~symfile_segment_data>: Remove.
<segment_info>: Change to std::vector.
* symfile.c (default_symfile_segments): Update.
* elfread.c (elf_symfile_segments): Update.
Diffstat (limited to 'gdb/symfile.h')
-rw-r--r-- | gdb/symfile.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/symfile.h b/gdb/symfile.h index 1f23951..fe79f79 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -93,11 +93,6 @@ struct symfile_segment_data CORE_ADDR size; }; - ~symfile_segment_data () - { - xfree (this->segment_info); - } - /* 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. */ @@ -106,7 +101,7 @@ struct symfile_segment_data /* 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>; |