From: Fred Fish Date: Thu, 24 Oct 1991 10:29:07 +0000 (+0000) Subject: Make internal errors produce more useful messages. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eaa1ef1df185459a3bacf9cb5b2cd2cfc10cd8ac;p=binutils-gdb.git Make internal errors produce more useful messages. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4a655f9ca74..6c45b93cf07 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ Thu Oct 24 01:32:51 1991 Fred Fish (fnf at cygnus.com) + * symtab.c: Make internal errors produce more useful messages. + * tm-68k.h: Move code that is duplicated in almost every single m68k based machine's configuration files to this common file. Duplications in the configuration files still need to be removed diff --git a/gdb/symtab.c b/gdb/symtab.c index 2d6cd05d755..0a53dcc2111 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -83,7 +83,7 @@ lookup_symtab_1 (name) if (!strcmp (name, ps->filename)) { if (ps->readin) - fatal ("Internal: readin pst found when no symtab found."); + error ("Internal: readin pst for `%s' found when no symtab found.", name); return PSYMTAB_TO_SYMTAB (ps); } @@ -106,7 +106,7 @@ lookup_symtab_1 (name) && !strcmp (ps->filename + l - len, name)) { if (ps->readin) - fatal ("Internal: readin pst found when no symtab found."); + error ("Internal: readin pst for `%s' found when no symtab found.", name); return PSYMTAB_TO_SYMTAB (ps); } } @@ -1039,7 +1039,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); sym = lookup_block_symbol (block, name, namespace); if (!sym) - fatal ("Internal: global symbol found in psymtab but not in symtab"); + error ("Internal: global symbol `%s' found in psymtab but not in symtab", name); if (symtab != NULL) *symtab = s; return sym; @@ -1071,7 +1071,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); sym = lookup_block_symbol (block, name, namespace); if (!sym) - fatal ("Internal: static symbol found in psymtab but not in symtab"); + error ("Internal: static symbol `%s' found in psymtab but not in symtab", name); if (symtab != NULL) *symtab = s; return sym; @@ -1104,7 +1104,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); sym = lookup_demangled_block_symbol (block, name); if (!sym) - fatal ("Internal: static symbol found in psymtab but not in symtab"); + error ("Internal: mangled static symbol `%s' found in psymtab but not in symtab", name); if (symtab != NULL) *symtab = s; return sym; @@ -1383,7 +1383,7 @@ find_pc_symtab (pc) ps = find_pc_psymtab (pc); if (ps && ps->readin) printf_filtered ( - "(Internal error: pc in read in psymtab, but not in symtab.)\n"); + "(Internal error: pc 0x%x in read in psymtab, but not in symtab.)\n", pc); if (ps) s = PSYMTAB_TO_SYMTAB (ps);