From c9bd6710ad40944544a652f960bcb01845377486 Mon Sep 17 00:00:00 2001 From: John Gilmore <gnu@cygnus> Date: Fri, 1 Nov 1991 19:12:35 +0000 Subject: * mipsread.c (read_mips_symtab, read_the_mips_symtab): Use real filename with error messages. * stack.c (frame_select_command): Rename to select_frame_command to avoid "fr" and "fra" having nonunique completions. * symfile.c (sort_symtab_syms): Ignore sort of zero symtab *. (symfile_init): Print file format name when unable to handle it. (free_named_symtabs): Use BLOCKVECTOR rather than obsolete BLOCKLIST. * symmisc.c (free_symtab): Only free linetable if nonzero. * symtab.h: Remove obsolete BLOCKLIST macros. --- gdb/symfile.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gdb/symfile.c') diff --git a/gdb/symfile.c b/gdb/symfile.c index 65942c8..cf75a17 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -162,11 +162,15 @@ void sort_symtab_syms (s) register struct symtab *s; { - register struct blockvector *bv = BLOCKVECTOR (s); - int nbl = BLOCKVECTOR_NBLOCKS (bv); + register struct blockvector *bv; + int nbl; int i; register struct block *b; + if (s == 0) + return; + bv = BLOCKVECTOR (s); + nbl = BLOCKVECTOR_NBLOCKS (bv); for (i = 0; i < nbl; i++) { b = BLOCKVECTOR_BLOCK (bv, i); @@ -652,7 +656,8 @@ symfile_init (sym_bfd) return sf2; } } - error ("I'm sorry, Dave, I can't do that. Symbol format unknown."); + error ("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown.", + bfd_get_target (sym_bfd)); return 0; /* Appease lint. */ } @@ -1005,8 +1010,8 @@ again2: contain the pathname of the object file. (This problem has been fixed in GDB 3.9x). */ - bv = BLOCKLIST (s); - if (BLOCKLIST_NBLOCKS (bv) > 2 + bv = BLOCKVECTOR (s); + if (BLOCKVECTOR_NBLOCKS (bv) > 2 || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))) { -- cgit v1.1