aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-12-04 03:24:36 +0000
committerJohn Gilmore <gnu@cygnus>1991-12-04 03:24:36 +0000
commit7a6093e8805d6a88bea7cc337a68538f43b11e01 (patch)
tree12158a1c432a82fe23e8cf8507911c7c9d3eaab2 /gdb/symfile.c
parent2e00f40a385a94838f7d74c508cedc7975463a22 (diff)
downloadgdb-7a6093e8805d6a88bea7cc337a68538f43b11e01.zip
gdb-7a6093e8805d6a88bea7cc337a68538f43b11e01.tar.gz
gdb-7a6093e8805d6a88bea7cc337a68538f43b11e01.tar.bz2
* 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.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8910930..0ab16a0 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)
{