aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index d4b9b7b..43385fe 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -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 ();