aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-11-01 19:12:35 +0000
committerJohn Gilmore <gnu@cygnus>1991-11-01 19:12:35 +0000
commitc9bd6710ad40944544a652f960bcb01845377486 (patch)
tree2c2666aeb08023ecd0c91dddb968a886e88ea3bb /gdb/symfile.c
parent6d7c88c3d02bec4ffa629ef22be6d9027bfee005 (diff)
downloadgdb-c9bd6710ad40944544a652f960bcb01845377486.zip
gdb-c9bd6710ad40944544a652f960bcb01845377486.tar.gz
gdb-c9bd6710ad40944544a652f960bcb01845377486.tar.bz2
* 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.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c15
1 files changed, 10 insertions, 5 deletions
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)))
{