aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-06-27 16:22:08 +0100
committerPedro Alves <palves@redhat.com>2017-06-27 16:22:08 +0100
commit23732b1e32dd58f7c731d9aee56ff0b22a645d53 (patch)
treea6d65195915105e05e8dd4ee05b21b91f8cb1243 /gdb/symfile.c
parenta4d1e79aaa4b9d994cd9790fc3b756748dc5571c (diff)
downloadgdb-23732b1e32dd58f7c731d9aee56ff0b22a645d53.zip
gdb-23732b1e32dd58f7c731d9aee56ff0b22a645d53.tar.gz
gdb-23732b1e32dd58f7c731d9aee56ff0b22a645d53.tar.bz2
objfile_per_bfd_storage non-POD
A following patch will want to add a std::vector to objfile_per_bfd_storage. That makes it non-trivially constructible/destructible. Since objfile_per_bfd_storage objects are allocated on an obstack, we need to call their ctors/dtors manually. This is what this patch does. And then since we can now rely on ctors/dtors being run, make objfile_per_bfd_storage::storage_obstack be an auto_obstack. gdb/ChangeLog: 2017-06-27 Pedro Alves <palves@redhat.com> * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of bfd_zalloc. Call objfile_per_bfd_storage's ctor. (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's dtor. * objfiles.h (objfile_per_bfd_storage): Add ctor. Make 'storage_obstack' field an auto_obstack. In-class initialize all non-bitfield fields. Make minsyms_read bool. * symfile.c (read_symbols): Adjust.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index f936cf3..aa53415 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -859,7 +859,7 @@ static void
read_symbols (struct objfile *objfile, symfile_add_flags add_flags)
{
(*objfile->sf->sym_read) (objfile, add_flags);
- objfile->per_bfd->minsyms_read = 1;
+ objfile->per_bfd->minsyms_read = true;
/* find_separate_debug_file_in_section should be called only if there is
single binary with no existing separate debug info file. */