This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit 7.6] dwarf2read.c fission fixes committed to 7.6 branch
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 01 Apr 2013 14:13:01 -0700
- Subject: [commit 7.6] dwarf2read.c fission fixes committed to 7.6 branch
Hi.
fyi, I committed these fixes to the 7.6 branch.
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.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.755
diff -u -p -r1.755 dwarf2read.c
--- dwarf2read.c 10 Mar 2013 18:03:57 -0000 1.755
+++ dwarf2read.c 1 Apr 2013 21:02:07 -0000
@@ -9079,8 +9079,6 @@ open_and_init_dwp_file (const char *comp
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 =
@@ -9095,8 +9093,6 @@ open_and_init_dwp_file (const char *comp
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);
@@ -9253,6 +9249,7 @@ free_dwo_file (struct dwo_file *dwo_file
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);
@@ -19702,6 +19699,8 @@ dwarf2_per_objfile_free (struct objfile
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);