gdb: Make ldirname return a std::string
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 3125fb1d557b677458e271dab8cbbceb42658200..9db479255731a532737983e9ec5171bcd386ab2f 100644 (file)
@@ -1,5 +1,5 @@
 /* Read coff symbol tables and convert to internal format, for GDB.
-   Copyright (C) 1987-2016 Free Software Foundation, Inc.
+   Copyright (C) 1987-2017 Free Software Foundation, Inc.
    Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
 
    This file is part of GDB.
@@ -559,7 +559,7 @@ static bfd *symfile_bfd;
 /* Read a symbol file, after initialization by coff_symfile_init.  */
 
 static void
-coff_symfile_read (struct objfile *objfile, int symfile_flags)
+coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   struct coff_symfile_info *info;
   bfd *abfd = objfile->obfd;
@@ -742,10 +742,10 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags)
 
       if (debugfile)
        {
-         bfd *abfd = symfile_bfd_open (debugfile);
+         gdb_bfd_ref_ptr abfd (symfile_bfd_open (debugfile));
 
-         make_cleanup_bfd_unref (abfd);
-         symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
+         symbol_file_add_separate (abfd.get (), debugfile, symfile_flags,
+                                   objfile);
        }
     }
 
This page took 0.023972 seconds and 4 git commands to generate.