* coffread.c (read_coff_symtab): Don't call getfilename if there
authorStu Grossman <grossman@cygnus>
Tue, 28 Sep 1993 01:19:07 +0000 (01:19 +0000)
committerStu Grossman <grossman@cygnus>
Tue, 28 Sep 1993 01:19:07 +0000 (01:19 +0000)
are no auxents.

gdb/ChangeLog
gdb/coffread.c

index 8497088f8b4827bf1165af51994f29ab04778863..52aab8b49dee0fe78139c33f9b92051a1a362cb9 100644 (file)
@@ -1,3 +1,8 @@
+Mon Sep 27 18:10:08 1993  Stu Grossman  (grossman at cygnus.com)
+
+       * coffread.c (read_coff_symtab):  Don't call getfilename if there
+       are no auxents.
+
 Mon Sep 27 10:22:37 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
        * symtab.c (find_pc_line): Fix comments.
index 05e9a08d7d2644326203c33a545a7302a22c45ae..e9aa6973517c3c01fc3d9ea711eb6149c7c20732 100644 (file)
@@ -33,6 +33,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <string.h>
 
 #include <time.h> /* For time_t in libbfd.h.  */
+#include <sys/types.h> /* For time_t, if not in time.h.  */
 #include "libbfd.h"            /* FIXME secret internal data from BFD */
 #include "coff/internal.h"     /* Internal format of COFF symbols in BFD */
 #include "libcoff.h"           /* FIXME secret internal data from BFD */
@@ -776,7 +777,11 @@ read_coff_symtab (symtab_offset, nsyms, objfile)
             * or symnum of first global after last .file.
             */
            next_file_symnum = cs->c_value;
-           filestring = getfilename (&main_aux);
+           if (cs->c_naux > 0)
+             filestring = getfilename (&main_aux);
+           else
+             filestring = "";
+
            /*
             * Complete symbol table for last object file
             * containing debugging information.