From: John Gilmore Date: Wed, 4 Dec 1991 03:24:36 +0000 (+0000) Subject: * coffread.c (coff_symfile_read): Avoid select_source_symtab, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a6093e8805d6a88bea7cc337a68538f43b11e01;p=binutils-gdb.git * coffread.c (coff_symfile_read): Avoid select_source_symtab, since it is not needed and can cause errors when examining ".o" files. * symfile.c (compact_misc_function_vector): Handle empty vector. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 656e54d4171..ca187538040 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ Tue Dec 3 17:24:57 1991 John Gilmore (gnu at cygnus.com) + * coffread.c (coff_symfile_read): Avoid select_source_symtab, + since it is not needed and can cause errors when examining ".o" + files. + + * symfile.c (compact_misc_function_vector): Handle empty vector. + * sparc-xdep.c: Force tm-file as tm-sparc.h, to make it compile when configured for cross debugging. FIXME, this needs a more general solution. diff --git a/gdb/coffread.c b/gdb/coffread.c index 21addf582b3..f942625a646 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -752,10 +752,6 @@ coff_symfile_read (sf, addr, mainline) /* Go over the misc symbol bunches and install them in vector. */ condense_misc_bunches (!mainline); - - /* Make a default for file to list. */ - - select_source_symtab (0); /* FIXME, this might be too slow, see dbxread */ } static void diff --git a/gdb/symfile.c b/gdb/symfile.c index 8910930e62f..0ab16a02458 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -347,9 +347,7 @@ sort_misc_function_vector () have different levels of "completeness", we may have duplicates that have one entry with type "mf_unknown" and the other with a known type. So if the one we are leaving alone has type mf_unknown, - overwrite it's type with the type from the one we are compacting out. -*/ - + overwrite its type with the type from the one we are compacting out. */ static void compact_misc_function_vector () @@ -357,6 +355,9 @@ compact_misc_function_vector () struct misc_function *copyfrom; struct misc_function *copyto; + if (misc_function_count == 0) + return; + copyfrom = copyto = misc_function_vector; while (copyfrom < misc_function_vector + misc_function_count - 1) {