summaryrefslogtreecommitdiff
path: root/gdb/somread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-21 16:18:48 +0000
committerTom Tromey <tromey@redhat.com>2013-03-21 16:18:48 +0000
commitf9ac4527d2df88424339547974ccd98f555eabd0 (patch)
tree86a5025ddfee7b31bf5c782f707c1c333d4f7775 /gdb/somread.c
parent4086827107e84381671622c3746a048e5602055c (diff)
downloadgdb-f9ac4527d2df88424339547974ccd98f555eabd0.tar.gz
* 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'.
Diffstat (limited to 'gdb/somread.c')
-rw-r--r--gdb/somread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/somread.c b/gdb/somread.c
index d9d3e7bb72b..0aa3dce686e 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -394,7 +394,7 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
/* Note: Here is OK to compare with ".text" because this is the
name that gdb itself gives to that section, not the SOM
name. */
- for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
+ for (i = 0; i < addrs->num_sections; i++)
if (strcmp (addrs->other[i].name, ".text") == 0)
break;
text_addr = addrs->other[i].addr;