*start = XNEWVEC (struct target_section, count);
*end = *start;
bfd_map_over_sections (some_bfd, add_to_section_table, (char *) end);
- if (*end > *start + count)
- internal_error (__FILE__, __LINE__,
- _("failed internal consistency check"));
+
+ gdb_assert (*end <= *start + count);
+
/* We could realloc the table, but it probably loses for most files. */
return 0;
}
ULONGEST memaddr = offset;
ULONGEST memend = memaddr + len;
- if (len == 0)
- internal_error (__FILE__, __LINE__,
- _("failed internal consistency check"));
+ gdb_assert (len != 0);
for (p = sections; p < sections_end; p++)
{