+2013-04-01 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (free_dwo_file): Add comment.
+ (dwarf2_per_objfile_free): Unref dwp bfd.
+
+2013-03-29 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (open_and_init_dwp_file): Remove incorrect, and
+ unnecessary, cleanup.
+
2013-03-28 Doug Evans <dje@google.com>
* python/python.c (finish_python_initialization): Provide suggestion
dwp_file->dbfd = dbfd;
do_cleanups (cleanups);
- cleanups = make_cleanup (free_dwo_file_cleanup, dwp_file);
-
/* +1: section 0 is unused */
dwp_file->num_sections = bfd_count_sections (dbfd) + 1;
dwp_file->elf_sections =
dwp_file->loaded_cutus = allocate_dwp_loaded_cutus_table (objfile);
- discard_cleanups (cleanups);
-
if (dwarf2_read_debug)
{
fprintf_unfiltered (gdb_stdlog, "DWP file found: %s\n", dwp_file->name);
int ix;
struct dwarf2_section_info *section;
+ /* Note: dbfd is NULL for virtual DWO files. */
gdb_bfd_unref (dwo_file->dbfd);
VEC_free (dwarf2_section_info_def, dwo_file->sections.types);
if (data->dwo_files)
free_dwo_files (data->dwo_files, objfile);
+ if (data->dwp_file)
+ gdb_bfd_unref (data->dwp_file->dbfd);
if (data->dwz_file && data->dwz_file->dwz_bfd)
gdb_bfd_unref (data->dwz_file->dwz_bfd);