mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-02 04:27:46 +08:00
gdb: replace some calls to internal_error with gdb_assert
There are a few spots using the pattern: if (condition) internal_error (__FILE__, __LINE__, _("failed internal consistency check")); The message brings no value, since it's pretty the description of a failed assertion. Replace a few of these that are obvious with gdb_assert. gdb/ChangeLog: * exec.c (build_section_table): Replace internal_error with gdb_assert. (section_table_xfer_memory_partial): Likewise. * mdebugread.c (parse_partial_symbols): Likewise. * psymtab.c (lookup_partial_symbol): Likewise. * utils.c (wrap_here): Likewise.
This commit is contained in:
@ -1578,9 +1578,7 @@ void
|
||||
wrap_here (const char *indent)
|
||||
{
|
||||
/* This should have been allocated, but be paranoid anyway. */
|
||||
if (!filter_initialized)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
gdb_assert (filter_initialized);
|
||||
|
||||
flush_wrap_buffer (gdb_stdout);
|
||||
if (chars_per_line == UINT_MAX) /* No line overflow checking. */
|
||||
|
Reference in New Issue
Block a user