This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RFC: call bfd_init
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 11 Jan 2013 08:18:21 -0700
- Subject: RFC: call bfd_init
Technically, a user of BFD is supposed to call bfd_init before calling
any other functions from the library.
bfd_init is a no-op, so right now nothing notices. But, I figured it
would be safe to add the call in case this ever changes.
Tom
2013-01-11 Tom Tromey <tromey@redhat.com>
* main.c (captured_main): Call bfd_init.
diff --git a/gdb/main.c b/gdb/main.c
index c9439bb..6ed014f 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -357,6 +357,8 @@ captured_main (void *data)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ bfd_init ();
+
make_cleanup (VEC_cleanup (cmdarg_s), &cmdarg_vec);
dirsize = 1;
dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg));