Check return value of bfd_init
authorTom Tromey <tom@tromey.com>
Thu, 25 Oct 2018 15:00:52 +0000 (09:00 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 30 Oct 2018 13:06:17 +0000 (07:06 -0600)
commit4d5d104997da3b7beaaf7920caee40dcff8a78d9
tree96b1046b159064892c977afe36ea362e209948e7
parentfd332753fa7050bb9d7c89147e32d285099fe402
Check return value of bfd_init

Alan recently added a way for BFD library users to check whether they
were in fact loading a compatible version of BFD:

https://sourceware.org/ml/binutils/2018-10/msg00198.html

It seemed reasonable to me that gdb should do this check as well, in
case someone is dynamically linking against BFD.

Simon pointed out that an earlier version of the patch would cause a
gdb crash if the test failed.  This version works around this by
lowering the call to bfd_init and adding a comment explaining where
'error' can safely be called in captured_main_1.

gdb/ChangeLog
2018-10-30  Tom Tromey  <tom@tromey.com>

* main.c (captured_main_1): Check return value of bfd_init.
gdb/ChangeLog
gdb/main.c
This page took 0.043335 seconds and 4 git commands to generate.