This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 06/10] enable bfd sharing for DWOs


It seems to me that DWO files are a good candidate for using the BFD
cache.  This patch implements that idea.

	* dwarf2read.c (try_open_dwo_file): use gdb_bfd_open.
---
 gdb/dwarf2read.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 6667c05..023447f 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8115,7 +8115,7 @@ try_open_dwo_file (const char *file_name)
   if (desc < 0)
     return NULL;
 
-  sym_bfd = gdb_bfd_ref (bfd_fopen (absolute_name, gnutarget, FOPEN_RB, desc));
+  sym_bfd = gdb_bfd_open (absolute_name, gnutarget, desc);
   if (!sym_bfd)
     {
       xfree (absolute_name);
-- 
1.7.7.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]