Update gdb.ada/variant_record_packed_array
[deliverable/binutils-gdb.git] / gdb / bfd-target.c
index 6728800461e5707009fd53319b3caebc75da6b7b..455d3e694ccac524423a19dde9a5a4b5f516eda0 100644 (file)
@@ -21,6 +21,7 @@
 #include "target.h"
 #include "bfd-target.h"
 #include "exec.h"
+#include "gdb_bfd.h"
 
 /* The object that is stored in the target_ops->to_data field has this
    type.  */
@@ -70,7 +71,7 @@ target_bfd_xclose (struct target_ops *t, int quitting)
 {
   struct target_bfd_data *data = t->to_data;
 
-  bfd_close (data->bfd);
+  gdb_bfd_unref (data->bfd);
   xfree (data->table.sections);
   xfree (data);
   xfree (t);
@@ -84,6 +85,7 @@ target_bfd_reopen (struct bfd *abfd)
 
   data = XZALLOC (struct target_bfd_data);
   data->bfd = abfd;
+  gdb_bfd_ref (abfd);
   build_section_table (abfd, &data->table.sections, &data->table.sections_end);
 
   t = XZALLOC (struct target_ops);
This page took 0.042343 seconds and 4 git commands to generate.