- Fix a regression due to PIE of reloading a changed exec file (BZ 433410).

- Include also biarch libgcc on %{multilib_64_archs} for the testsuite.
- Cosmetic fix of a testcase sanity breakpoint setting (part of BZ 233852).
- New test of hiding unexpected breakpoints on intentional step commands.
- New test of GCORE for shmid 0 shared memory mappings.
- New test of a crash on `focus cmd', `focus prev' commands.
- Fix a minor test race of the hardware watchpoints after the fork call.
- Test crash on a sw watchpoint condition getting out of the scope.
This commit is contained in:
Jan Kratochvil 2008-04-13 23:51:48 +00:00
parent a9e8793603
commit 5f5d7d94b5
2 changed files with 14 additions and 27 deletions

View File

@ -2,6 +2,11 @@
* symfile.c (reread_symbols): Reread also EXEC_BFD if changed.
2008-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* symfile.c (reread_symbols): Reload whole EXEC_BFD by the EXEC module
as its in-place patching did cause regressions.
Testcase: Regressed by the gdb-6.7 version of `gdb-6.3-pie-20050110.patch':
Running ../../../gdb/testsuite/gdb.base/reread.exp ...
PASS: gdb.base/reread.exp: breakpoint foo in first file (PRMS 13484)
@ -18,35 +23,14 @@ Testcase: Regressed by the gdb-6.7 version of `gdb-6.3-pie-20050110.patch':
--- gdb-6.7-orig/gdb/symfile.c 2007-10-29 01:04:35.000000000 +0100
+++ gdb-6.7-patched/gdb/symfile.c 2007-10-29 01:03:13.000000000 +0100
@@ -2810,6 +2810,33 @@ reread_symbols (void)
@@ -2810,6 +2810,12 @@ 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)
+ {
+ char *exec_filename = bfd_get_filename (exec_bfd);
+ bfd *exec_bfd_new;
+
+ /* We have to leak the memory here as there are stale
+ references to EXEC_BFD, at least by
+ `(struct section_table *)->bfd'. So far we need to update
+ only START_ADDRESS there. */
+#if 0
+ if (!bfd_close (exec_bfd))
+ error (_("Can't close BFD for %s: %s"), exec_filename,
+ bfd_errmsg (bfd_get_error ()));
+#endif
+ exec_bfd_new = bfd_openr (exec_filename, gnutarget);
+ if (exec_bfd_new == NULL)
+ error (_("Can't open %s as a new main executable."),
+ exec_filename);
+ /* bfd_openr sets cacheable to true, which is what we want. */
+ if (!bfd_check_format (exec_bfd_new, bfd_object))
+ error (_("Can't reopen the main executable %s: %s."),
+ exec_filename, bfd_errmsg (bfd_get_error ()));
+ /* FIXME: The non-freeing hack. */
+ memcpy (exec_bfd, exec_bfd_new, sizeof (*exec_bfd));
+ exec_ops.to_open (bfd_get_filename (objfile->obfd), 0);
+ }
+
/* Clean up any state BFD has sitting around. We don't need

View File

@ -13,7 +13,7 @@ Version: 6.8
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 1postcvs%{?_with_upstream:.upstream}%{?dist}
Release: 2%{?_with_upstream:.upstream}%{?dist}
License: GPL
Group: Development/Debuggers
@ -243,8 +243,8 @@ Patch229: gdb-6.3-bz140532-ppc-unwinding-test.patch
# Testcase for exec() from threaded program (BZ 202689).
Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
# Backported post gdb-6.7 release fixups.
#Patch232: gdb-6.7.1-upstream.patch
# Backported post gdb-6.8 release fixups.
#Patch232: gdb-6.8-upstream.patch
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
@ -371,6 +371,7 @@ BuildRequires: gcc-gnat
%ifarch %{multilib_64_archs} sparc ppc
# Ensure glibc{,-devel} is installed for both multilib arches
BuildRequires: /lib/libc.so.6 %{_exec_prefix}/lib/libc.so /lib64/libc.so.6 %{_exec_prefix}/lib64/libc.so
BuildRequires: /lib/libgcc_s.so.1 /lib64/libgcc_s.so.1
%endif
%endif
@ -757,7 +758,9 @@ fi
%{_mandir}/*/gdbserver.1*
%changelog
* Sun Mar 30 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-1postcvs
* Fri Apr 11 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-2
- Fix a regression due to PIE of reloading a changed exec file (BZ 433410).
- Include also biarch libgcc on %%{multilib_64_archs} for the testsuite.
- Cosmetic fix of a testcase sanity breakpoint setting (part of BZ 233852).
- New test of hiding unexpected breakpoints on intentional step commands.
- New test of GCORE for shmid 0 shared memory mappings.