X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fmachoread.c;h=2bb3ab32cb30d21048479b6cd570b849180f16c8;hb=6a053cb1ff643cec3349d7f2f47ae5573f82d613;hp=26eac27a049c035b524d200a45d2cc66235887cd;hpb=85102364b2d1845fe9ae7d70096671a3ea4bccf3;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/machoread.c b/gdb/machoread.c index 26eac27a04..2bb3ab32cb 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -1,5 +1,5 @@ /* Darwin support for GDB, the GNU debugger. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. Contributed by AdaCore. @@ -907,12 +907,7 @@ macho_symfile_offsets (struct objfile *objfile, struct obj_section *osect; /* Allocate section_offsets. */ - objfile->num_sections = bfd_count_sections (objfile->obfd); - objfile->section_offsets = (struct section_offsets *) - obstack_alloc (&objfile->objfile_obstack, - SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); - memset (objfile->section_offsets, 0, - SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + objfile->section_offsets.assign (bfd_count_sections (objfile->obfd), 0); /* This code is run when we first add the objfile with symfile_add_with_addrs_or_offsets, when "addrs" not "offsets" are