* symfile.c (reread_symbols): Reload EXEC_BFD on its change.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 4 May 2008 14:34:06 +0000 (14:34 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 4 May 2008 14:34:06 +0000 (14:34 +0000)
gdb/ChangeLog
gdb/symfile.c

index d05d6a845d7adbc8c6116e9d6bb96cbb23b5989f..d2139679e7454e0042413572dc31aac345f48b7e 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * symfile.c (reread_symbols): Reload EXEC_BFD on its change.
+
 2008-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * inferior.h (read_pc_pid, write_pc_pid): Remove.
index d991c154a78c78649f1f3220122ac53fad7e9367..cc515d585d7c22cc71eddcc6ac61daf244891204 100644 (file)
@@ -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.  */