Update copyright year in most headers.
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 3f5ff96a1530e0b790a5dd06292308b2daae492b..eca6618d8e62acdc98e25da66a1baf4eb372b5d4 100644 (file)
@@ -1,7 +1,7 @@
 /* Read coff symbol tables and convert to internal format, for GDB.
    Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
-   1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009,
+   2010 Free Software Foundation, Inc.
    Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
 
    This file is part of GDB.
@@ -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.024492 seconds and 4 git commands to generate.