From 65cf3563597713173bb688287a21666ec66e722d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 8 Apr 2013 20:04:42 +0000 Subject: * coffread.c (cs_to_section): Use gdb_bfd_section_index. * elfread.c (record_minimal_symbol, elf_symtab_read): Use gdb_bfd_section_index. * gdb_bfd.c (gdb_bfd_section_index, gdb_bfd_count_sections): New functions. * gdb_bfd.h (gdb_bfd_section_index, gdb_bfd_count_sections): Declare. * machoread.c (macho_symtab_add_minsym, macho_symfile_offsets): Update. * objfiles.c (add_to_objfile_sections_full): New function. (add_to_objfile_sections): Use it. (build_section_table): Rewrite. (objfile_relocate1): Use gdb_bfd_section_index. Update. * objfiles.h (obj_section_offset): Use gdb_bfd_section_index. (struct objfile) : Update comment. (ALL_OBJFILE_OSECTIONS): Skip sections where the_bfd_section is NULL. (ALL_OBJSECTIONS): Use it. * solib-dsbt.c (dsbt_relocate_main_executable): Update. * solib-frv.c (frv_relocate_main_executable): Update. * solib-target.c (solib_target_relocate_section_addresses): Use gdb_bfd_section_index. * symfile.c (build_section_addr_info_from_section_table): Use gdb_bfd_section_index. (build_section_addr_info_from_bfd, place_section): Likewise. * symtab.c (fixup_section): Update. * xcoffread.c (find_targ_sec): Use gdb_bfd_section_index. --- gdb/symtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/symtab.c') diff --git a/gdb/symtab.c b/gdb/symtab.c index 1922d9b..2526503 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1064,7 +1064,7 @@ fixup_section (struct general_symbol_info *ginfo, ALL_OBJFILE_OSECTIONS (objfile, s) { - int idx = s->the_bfd_section->index; + int idx = s - objfile->sections; CORE_ADDR offset = ANOFFSET (objfile->section_offsets, idx); if (obj_section_addr (s) - offset <= addr -- cgit v1.1