Fix uninitialized warning in gdb_bfd_open
authorTom Tromey <tromey@adacore.com>
Tue, 8 Sep 2020 16:35:22 +0000 (10:35 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 8 Sep 2020 16:35:22 +0000 (10:35 -0600)
commit03b0a45f15e44da7983dffea921c0c43a19250ff
tree3ed934e41e6457cb27dc40b74725ec506e32c1b8
parent3cae444768c36314cc4acf80714461cbe0aff4e4
Fix uninitialized warning in gdb_bfd_open

The previous patch introduced an uninitialized warning in
gdb_bfd_open.  The problem was that "abfd" was being used without
being initialized.

This patch fixes the problem by calling bfd_fopen in the branch where
"fstat" has failed.

gdb/ChangeLog
2020-09-08  Tom Tromey  <tromey@adacore.com>

* gdb_bfd.c (gdb_bfd_open): Call bfd_fopen when fstat fails.
gdb/ChangeLog
gdb/gdb_bfd.c