From: John Gilmore Date: Fri, 1 Nov 1991 19:12:35 +0000 (+0000) Subject: * mipsread.c (read_mips_symtab, read_the_mips_symtab): Use real X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9bd6710ad40944544a652f960bcb01845377486;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3045478a8df..1aa0870035c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +Fri Nov 1 11:05:47 1991 John Gilmore (gnu at cygnus.com) + + * 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. + Thu Oct 31 18:12:43 1991 Stu Grossman (grossman at cygnus.com) * infrun.c (wait_for_inferior): another stepi/nexti fix. Ensure diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 964f791bfc3..2f027c7145b 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -381,7 +381,7 @@ read_the_mips_symtab(abfd, fsym, end_of_text_segp) return; readerr: - error("Short read on %s", symfile); + error("Short read on %s", bfd_get_filename (abfd)); } @@ -563,8 +563,11 @@ read_mips_symtab (abfd, desc) */ if (compare_glevel(max_glevel, GLEVEL_2) < 0) { if (max_gdbinfo == 0) - printf("\n%s not compiled with -g, debugging support is limited.", symfile); - printf("\nYou should compile with -g2 or -g3 for best debugging support.\n"); + printf ( +"\n%s not compiled with -g, debugging support is limited.\n", + bfd_get_filename (abfd)); + printf( +"You should compile with -g2 or -g3 for best debugging support.\n"); fflush(stdout); } } diff --git a/gdb/symfile.c b/gdb/symfile.c index 65942c84441..cf75a17e643 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))) {