aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-24 20:15:56 +0000
committerTom Tromey <tromey@redhat.com>2012-07-24 20:15:56 +0000
commit882f447fddcf308f10b2398c84fbb95a4905c49e (patch)
tree191dadb3aaab5f1d8ec29395bf0fae2001ede367 /gdb/symfile.c
parent53ab40660e0418775704ba4f8d486701128075fa (diff)
downloadgdb-882f447fddcf308f10b2398c84fbb95a4905c49e.zip
gdb-882f447fddcf308f10b2398c84fbb95a4905c49e.tar.gz
gdb-882f447fddcf308f10b2398c84fbb95a4905c49e.tar.bz2
* symfile.c (symbol_file_add): Don't open BFD twice.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c3
1 files changed, 1 insertions, 2 deletions
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;
}