diff options
Diffstat (limited to 'gdb/exec.c')
-rw-r--r-- | gdb/exec.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -661,26 +661,14 @@ add_target_sections_of_objfile (struct objfile *objfile) { struct target_section_table *table = current_target_sections; struct obj_section *osect; - unsigned count = 0; - if (objfile == NULL) - return; + gdb_assert (objfile != nullptr); /* Compute the number of sections to add. */ ALL_OBJFILE_OSECTIONS (objfile, osect) { if (bfd_section_size (osect->the_bfd_section) == 0) continue; - count++; - } - - if (count == 0) - return; - - ALL_OBJFILE_OSECTIONS (objfile, osect) - { - if (bfd_section_size (osect->the_bfd_section) == 0) - continue; table->sections.emplace_back (); target_section &ts = table->sections.back (); |