X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fmachoread.c;h=9881298021dfe53d23ce6b3cfbf4f89e7798a58a;hb=7e6e972f74aeac0ebdbd95a7f905d871cd2581de;hp=f7dc280617532fb8af081f1bc281a87953a4ed6b;hpb=b811d2c2920ddcb1adcd438da38e90912b31f45f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/machoread.c b/gdb/machoread.c index f7dc280617..9881298021 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -28,7 +28,6 @@ #include "gdbcore.h" #include "mach-o.h" #include "aout/stab_gnu.h" -#include "psympriv.h" #include "complaints.h" #include "gdb_bfd.h" #include @@ -907,12 +906,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 @@ -966,8 +960,9 @@ static const struct sym_fns macho_sym_fns = { &psym_functions }; +void _initialize_machoread (); void -_initialize_machoread (void) +_initialize_machoread () { add_symtab_fns (bfd_target_mach_o_flavour, &macho_sym_fns);