make "file" use the BFD cache better
Right now the "file" command will discard the exec_bfd and then
possibly open a new one.
If this ends up reopening the same file, it can cause needless work by
gdb -- destroying all the per-BFD data just to re-read it again.
This patch changes the code to hold a reference to the old exec_bfd
while opening the new one.
The possible downside of this is a higher peak memory use.
2014-02-26 Tom Tromey <tromey@redhat.com>
* exec.c (exec_file_attach): Hold a reference to exec_bfd.