From: Jan Kratochvil Date: Sun, 4 May 2008 14:34:06 +0000 (+0000) Subject: * symfile.c (reread_symbols): Reload EXEC_BFD on its change. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2de52bb5aa3fdd52a80d4d91cc4b55d530f4164;p=binutils-gdb.git * symfile.c (reread_symbols): Reload EXEC_BFD on its change. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d05d6a845d7..d2139679e74 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2008-05-04 Jan Kratochvil + + * symfile.c (reread_symbols): Reload EXEC_BFD on its change. + 2008-05-04 Ulrich Weigand * inferior.h (read_pc_pid, write_pc_pid): Remove. 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. */