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]

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));


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