summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2008-05-04 14:34:06 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2008-05-04 14:34:06 +0000
commit0b7a2b0e57e9f4525133824d440f364ca1774b5e (patch)
tree08ca9f91e4671a21d07e8d60c6aa3d924bae7bcf /gdb/symfile.c
parent8ce4f98b5a7d8460034f1abc1c8ee980e7453933 (diff)
downloadgdb-0b7a2b0e57e9f4525133824d440f364ca1774b5e.tar.gz
* symfile.c (reread_symbols): Reload EXEC_BFD on its change.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index d991c154a78..cc515d585d7 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2331,6 +2331,14 @@ reread_symbols (void)
/* We need to do this whenever any symbols go away. */
make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/);
+ if (exec_bfd != NULL && strcmp (bfd_get_filename (objfile->obfd),
+ bfd_get_filename (exec_bfd)) == 0)
+ {
+ /* Reload EXEC_BFD without asking anything. */
+
+ exec_file_attach (bfd_get_filename (objfile->obfd), 0);
+ }
+
/* Clean up any state BFD has sitting around. We don't need
to close the descriptor but BFD lacks a way of closing the
BFD without closing the descriptor. */