2009-12-02 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 3f5ff96a1530e0b790a5dd06292308b2daae492b..58f53375319e927f223f03534206e3b25635bc6c 100644 (file)
@@ -637,6 +637,21 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags)
 
   dwarf2_build_frame_info (objfile);
 
+  /* Try to add separate debug file if no symbols table found.   */
+  if (!objfile_has_partial_symbols (objfile))
+    {
+      char *debugfile;
+
+      debugfile = find_separate_debug_file_by_debuglink (objfile);
+
+      if (debugfile)
+       {
+         bfd *abfd = symfile_bfd_open (debugfile);
+         symbol_file_add_separate (abfd, symfile_flags, objfile);
+         xfree (debugfile);
+       }
+    }
+
   do_cleanups (back_to);
 }
 
This page took 0.022603 seconds and 4 git commands to generate.