ignatenkobrain / rpms / gdb

Forked from rpms/gdb 5 years ago
Clone
eb9d945
2007-10-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
eb9d945
eb9d945
	* symfile.c (reread_symbols): Reread also EXEC_BFD if changed.
eb9d945
5f5d7d9
2008-04-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
5f5d7d9
5f5d7d9
	* symfile.c (reread_symbols): Reload whole EXEC_BFD by the EXEC module
5f5d7d9
	as its in-place patching did cause regressions.
5f5d7d9
eb9d945
Testcase: Regressed by the gdb-6.7 version of `gdb-6.3-pie-20050110.patch':
eb9d945
 Running ../../../gdb/testsuite/gdb.base/reread.exp ...
eb9d945
 PASS: gdb.base/reread.exp: breakpoint foo in first file (PRMS 13484)
eb9d945
 PASS: gdb.base/reread.exp: run to foo() (PRMS 13484)
eb9d945
-PASS: gdb.base/reread.exp: run to foo() second time
eb9d945
+FAIL: gdb.base/reread.exp: run to foo() second time
eb9d945
 PASS: gdb.base/reread.exp: second pass: breakpoint foo in first file
eb9d945
-PASS: gdb.base/reread.exp: second pass: run to foo()
eb9d945
-PASS: gdb.base/reread.exp: second pass: continue to completion
eb9d945
-PASS: gdb.base/reread.exp: second pass: run to foo() second time
eb9d945
+FAIL: gdb.base/reread.exp: second pass: run to foo()
eb9d945
+FAIL: gdb.base/reread.exp: second pass: continue to completion
eb9d945
+FAIL: gdb.base/reread.exp: second pass: run to foo() second time
eb9d945
eb9d945
--- gdb-6.7-orig/gdb/symfile.c	2007-10-29 01:04:35.000000000 +0100
eb9d945
+++ gdb-6.7-patched/gdb/symfile.c	2007-10-29 01:03:13.000000000 +0100
5f5d7d9
@@ -2810,6 +2810,12 @@ reread_symbols (void)
eb9d945
 	      /* We need to do this whenever any symbols go away.  */
eb9d945
 	      make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/);
eb9d945
 
eb9d945
+	      if (exec_bfd != NULL && strcmp (bfd_get_filename (objfile->obfd),
eb9d945
+					      bfd_get_filename (exec_bfd)) == 0)
eb9d945
+		{
5f5d7d9
+		  exec_ops.to_open (bfd_get_filename (objfile->obfd), 0);
eb9d945
+		}
eb9d945
+
eb9d945
 	      /* Clean up any state BFD has sitting around.  We don't need
eb9d945
 	         to close the descriptor but BFD lacks a way of closing the
eb9d945
 	         BFD without closing the descriptor.  */