This adds a couple of calls to bfd_cache_close at points where a BFD
isn't actively needed by gdb. Normally at these points, all the
needed section data is already mapped, so we can simply close the file
descriptor. This is harmless at worst, because if this is needed
after all, the BFD file descriptor cache will reopen it.
dwarf_read_debug_printf ("DWO file found: %s", dwo_name);
+ bfd_cache_close (dwo_file->dbfd.get ());
+
return dwo_file.release ();
}
pulongest (dwp_file->cus ? dwp_file->cus->nr_units : 0),
pulongest (dwp_file->tus ? dwp_file->tus->nr_units : 0));
+ bfd_cache_close (dwp_file->dbfd.get ());
+
return dwp_file;
}