aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-19 12:18:05 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-19 12:18:36 -0400
commit9005fbbb0023f212fcd797227b839f21cb8bf0a1 (patch)
tree12437fdcf47ab41839ad4e9a76430a826698b853 /gdb/symfile.c
parent68b888fff3164b5e8e347d9c1ca351c366f0aac4 (diff)
downloadgdb-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.c')
-rw-r--r--gdb/symfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 22793e7..e6ec458 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -747,7 +747,9 @@ default_symfile_segments (bfd *abfd)
symfile_segment_data_up data (new symfile_segment_data);
num_sections = bfd_count_sections (abfd);
- data->segment_info = XCNEWVEC (int, num_sections);
+
+ /* All elements are initialized to 0 (map to no segment). */
+ data->segment_info.resize (num_sections);
for (i = 0, sect = abfd->sections; sect != NULL; i++, sect = sect->next)
{