From 882f447fddcf308f10b2398c84fbb95a4905c49e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 24 Jul 2012 20:15:56 +0000 Subject: * symfile.c (symbol_file_add): Don't open BFD twice. --- gdb/ChangeLog | 4 ++++ gdb/symfile.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 07bb7bf..a14a25f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2012-07-24 Tom Tromey + + * symfile.c (symbol_file_add): Don't open BFD twice. + 2012-07-24 Marc Khouzam * breakpoint.c (create_breakpoint): Store condition for pending diff --git a/gdb/symfile.c b/gdb/symfile.c index 7a913e9..95ed480 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1208,8 +1208,7 @@ symbol_file_add (char *name, int add_flags, struct section_addr_info *addrs, struct cleanup *cleanup = make_cleanup_bfd_unref (bfd); struct objfile *objf; - objf = symbol_file_add_from_bfd (symfile_bfd_open (name), add_flags, addrs, - flags, NULL); + objf = symbol_file_add_from_bfd (bfd, add_flags, addrs, flags, NULL); do_cleanups (cleanup); return objf; } -- cgit v1.1