diff options
author | Fred Fish <fnf@specifix.com> | 1991-10-24 10:29:07 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1991-10-24 10:29:07 +0000 |
commit | eaa1ef1df185459a3bacf9cb5b2cd2cfc10cd8ac (patch) | |
tree | 59c7d7bd6f37ce3a42259845b45daaf7f02ac466 | |
parent | e0796d22131863dc0738fc2d5b130d6bdcc220e5 (diff) | |
download | gdb-eaa1ef1df185459a3bacf9cb5b2cd2cfc10cd8ac.zip gdb-eaa1ef1df185459a3bacf9cb5b2cd2cfc10cd8ac.tar.gz gdb-eaa1ef1df185459a3bacf9cb5b2cd2cfc10cd8ac.tar.bz2 |
Make internal errors produce more useful messages.
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/symtab.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4a655f9..6c45b93 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 2d6cd05..0a53dcc 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); |