aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-09-28 01:19:07 +0000
committerStu Grossman <grossman@cygnus>1993-09-28 01:19:07 +0000
commitf0fcf00aade46aebe53e6cb06058e26d75a920cc (patch)
treed77dac42a4e1cce11364ad5646f054602e221c08 /gdb/coffread.c
parenta3e90d973bd17c275f6e7ba5d56e118c977bfa8f (diff)
downloadgdb-f0fcf00aade46aebe53e6cb06058e26d75a920cc.zip
gdb-f0fcf00aade46aebe53e6cb06058e26d75a920cc.tar.gz
gdb-f0fcf00aade46aebe53e6cb06058e26d75a920cc.tar.bz2
* coffread.c (read_coff_symtab): Don't call getfilename if there
are no auxents.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 05e9a08..e9aa697 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -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.