Fix sometimes-uninitialized warning in gdbscm_value_address
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 3125fb1d557b677458e271dab8cbbceb42658200..4b5edf0919ed605f5ec3d823ed18bb66a83c4030 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.
@@ -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;
@@ -559,7 +557,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 +740,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.02533 seconds and 4 git commands to generate.