From e2ff18a0a54f98c38f8d9b80c36faa7aacacf6d6 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 2 Apr 2020 15:43:41 -0400 Subject: 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. --- gdb/mdebugread.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gdb/mdebugread.c') diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index bac6fd6..5dfd80d 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -3576,9 +3576,8 @@ parse_partial_symbols (minimal_symbol_reader &reader, CORE_ADDR svalue; short section; - if (ext_ptr->ifd != f_idx) - internal_error (__FILE__, __LINE__, - _("failed internal consistency check")); + gdb_assert (ext_ptr->ifd == f_idx); + psh = &ext_ptr->asym; /* Do not add undefined symbols to the partial symbol table. */ -- cgit v1.1