diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 48a58e03984..022d25cf0cf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2021-06-28 Simon Marchi + + PR gdb/28017 + * machoread.c (macho_symfile_offsets): Use + gdb_bfd_count_sections to allocate objfile::section_offsets. + 2021-06-28 Simon Marchi * objfiles.h (struct obj_section): Move down. diff --git a/gdb/machoread.c b/gdb/machoread.c index a0f0307d529..b3bd54940b4 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -907,7 +907,7 @@ macho_symfile_offsets (struct objfile *objfile, struct obj_section *osect; /* Allocate section_offsets. */ - objfile->section_offsets.assign (bfd_count_sections (objfile->obfd), 0); + objfile->section_offsets.assign (gdb_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