* symfile.c (separate_debug_file_exists): Update.
[deliverable/binutils-gdb.git] / gdb / corelow.c
index 1fd60e41db54b4038f6db0f919a0bb9977233ed6..340b149c2e81b873b2e02a9b3196cdca55e81c58 100644 (file)
@@ -318,14 +318,12 @@ core_open (char *filename, int from_tty)
   if (scratch_chan < 0)
     perror_with_name (filename);
 
-  temp_bfd = gdb_bfd_ref (bfd_fopen (filename, gnutarget, 
-                                    write_files ? FOPEN_RUB : FOPEN_RB,
-                                    scratch_chan));
+  temp_bfd = gdb_bfd_fopen (filename, gnutarget, 
+                           write_files ? FOPEN_RUB : FOPEN_RB,
+                           scratch_chan);
   if (temp_bfd == NULL)
     perror_with_name (filename);
 
-  gdb_bfd_stash_filename (temp_bfd);
-
   if (!bfd_check_format (temp_bfd, bfd_core)
       && !gdb_check_format (temp_bfd))
     {
@@ -333,7 +331,7 @@ core_open (char *filename, int from_tty)
       /* FIXME: should be checking for errors from bfd_close (for one
          thing, on error it does not free all the storage associated
          with the bfd).  */
-      make_cleanup_bfd_close (temp_bfd);
+      make_cleanup_bfd_unref (temp_bfd);
       error (_("\"%s\" is not a core dump: %s"),
             filename, bfd_errmsg (bfd_get_error ()));
     }
This page took 0.036962 seconds and 4 git commands to generate.