aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-03-17 19:06:32 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-03-17 19:06:32 +0000
commit9d61147ec534c032a4099913a4836e85dfc51938 (patch)
treedbb00bb04de567c511cbd20a72b3dca9e0d7089a /gdb/xcoffread.c
parent8b4a5fafe19d9bdd9a3fc36d0adf2c3d1e6f7d3d (diff)
downloadgdb-9d61147ec534c032a4099913a4836e85dfc51938.zip
gdb-9d61147ec534c032a4099913a4836e85dfc51938.tar.gz
gdb-9d61147ec534c032a4099913a4836e85dfc51938.tar.bz2
* xcoffread.c (xcoff_symfile_read): Only read stringtab and
debugsec if there are a non-zero number of symbols.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index a50b67a..84be25f 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2257,14 +2257,17 @@ xcoff_symfile_read (objfile, section_offset, mainline)
error("\"%s\": error reading line numbers\n", name);
}
- val = init_stringtab(abfd, stringtab_offset, objfile);
- if (val < 0) {
- error ("\"%s\": can't get string table", name);
- }
+ if (num_symbols > 0)
+ {
+ val = init_stringtab(abfd, stringtab_offset, objfile);
+ if (val < 0) {
+ error ("\"%s\": can't get string table", name);
+ }
- if (init_debugsection(abfd) < 0) {
- error ("Error reading .debug section of `%s'\n", name);
- }
+ if (init_debugsection(abfd) < 0) {
+ error ("Error reading .debug section of `%s'\n", name);
+ }
+ }
/* Position to read the symbol table. Do not read it all at once. */
val = bfd_seek(abfd, symtab_offset, L_SET);