From f9ac4527d2df88424339547974ccd98f555eabd0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 21 Mar 2013 16:18:48 +0000 Subject: * symfile.c (alloc_section_addr_info): Update header. Don't set 'num_sections' field. (build_section_addr_info_from_section_table): Set 'num_sections'. (build_section_addr_info_from_bfd): Likewise. (build_section_addr_info_from_objfile): Remove dead loop condition. (free_section_addr_info): Unconditionally call xfree. (relative_addr_info_to_section_offsets, addrs_section_sort) (addr_info_make_relative, syms_from_objfile_1): Remove dead loop condition. (syms_from_objfile_1): Remove dead 'if' condition. Check 'num_sections'. (add_symbol_file_command): Set 'num_sections'. * symfile-mem.c (symbol_file_add_from_memory): Set 'num_sections'. * somread.c (som_symfile_offsets): Remove dead loop condition. * machoread.c (macho_symfile_offsets): Remove dead 'if'. * jit.c (jit_bfd_try_read_symtab): Set 'num_sections'. --- gdb/symfile-mem.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/symfile-mem.c') diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index bb9bbd87417..e148d09a8e0 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -127,6 +127,7 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, char *name, sai->other[i].sectindex = sec->index; ++i; } + sai->num_sections = i; objf = symbol_file_add_from_bfd (nbfd, from_tty ? SYMFILE_VERBOSE : 0, sai, OBJF_SHARED, NULL); -- cgit v1.2.1