Fix GDBserver build failure when $development is false
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 9db479255731a532737983e9ec5171bcd386ab2f..fbbbb68f71c430a8d647d98213189d6d06f7dbe2 100644 (file)
@@ -1,5 +1,5 @@
 /* Read coff symbol tables and convert to internal format, for GDB.
-   Copyright (C) 1987-2017 Free Software Foundation, Inc.
+   Copyright (C) 1987-2018 Free Software Foundation, Inc.
    Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
 
    This file is part of GDB.
@@ -43,8 +43,6 @@
 #include "psymtab.h"
 #include "build-id.h"
 
-extern void _initialize_coffread (void);
-
 /* Key for COFF-associated data.  */
 
 static const struct objfile_data *coff_objfile_data_key;
@@ -394,7 +392,9 @@ coff_start_symtab (struct objfile *objfile, const char *name)
                 NULL,
   /* The start address is irrelevant, since we set
      last_source_start_addr in coff_end_symtab.  */
-                0);
+                0,
+  /* Let buildsym.c deduce the language for this symtab.  */
+                language_unknown);
   record_debugformat ("COFF");
 }
 
@@ -699,7 +699,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
        }
     }
 
-  bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
+  if (!(objfile->flags & OBJF_READNEVER))
+    bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
 
   if (info->stabsects)
     {
This page took 0.025765 seconds and 4 git commands to generate.