- [pie] Fix a race in testcase gdb.base/valgrind-db-attach.exp.

- Fix regression by python on ia64 due to stale current frame.
- Disable python iff RHEL-5 && (Brew || ppc64).
This commit is contained in:
Jan Kratochvil 2009-12-21 22:46:49 +00:00
parent f056ae4c36
commit 367485a7c6
3 changed files with 58 additions and 6 deletions

View File

@ -299,3 +299,14 @@
} }
return retval; return retval;
} }
--- gdb-7.0/gdb/testsuite/gdb.base/valgrind-db-attach.exp-orig 2009-12-21 16:50:42.000000000 +0100
+++ gdb-7.0/gdb/testsuite/gdb.base/valgrind-db-attach.exp 2009-12-21 16:51:24.000000000 +0100
@@ -67,6 +67,8 @@ gdb_test_multiple "" $test {
}
}
+gdb_test "" "" "eat first prompt"
+
# Initialization from default_gdb_start.
gdb_test "set height 0"
gdb_test "set width 0"

View File

@ -0,0 +1,27 @@
Problem occurs with python and its get_current_arch () as it selects
selected_frame and current_frame while still inferior_ptid is valid for the
original parent. But since this place it is already attached and later
unwinders try to access it, breaking:
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
--- ./gdb/infrun.c 2009-12-21 20:26:30.000000000 +0100
+++ ./gdb/infrun.c 2009-12-21 20:26:11.000000000 +0100
@@ -375,6 +375,9 @@ follow_fork (void)
}
else
{
+ /* Possibly referenced PARENT is no longer valid. */
+ reinit_frame_cache ();
+
/* This pending follow fork event is now handled, one way
or another. The previous selected thread may be gone
from the lists by now, but if it is still around, need

View File

@ -8,18 +8,23 @@
%if 0%{!?dist:1} %if 0%{!?dist:1}
%define rhel 5 %define rhel 5
%define dist .el5 %define dist .el5
%endif
# RHEL-5 Brew does not set it.
%if "%{dist}" == ".el5"
%define el5 1 %define el5 1
%endif %endif
# RHEL-5 Brew does not set %{el5}.
%if "%{dist}" == ".el5"
# RHEL-5 ppc* python .so files are shipped only as ppc but gdb is ppc64 there. # RHEL-5 ppc* python .so files are shipped only as ppc but gdb is ppc64 there.
# Brew builds it fine as its ppc64 buildroot has full ppc64 package set. # Brew builds it fine as its ppc64 buildroot has full ppc64 package set.
%if 0%{?el5:1} # Make this conditional so that Brew-built GDB has no python on any arch but
%ifarch ppc ppc64 # GDB rebuilt on native non-ppc64 host does have it.
%if 0%{!?el5:1}
%define _without_python 1
%else
%ifarch ppc64
%define _without_python 1 %define _without_python 1
%endif %endif
%endif %endif
%define el5 1
%endif
Summary: A GNU source-level debugger for C, C++, Java and other languages Summary: A GNU source-level debugger for C, C++, Java and other languages
Name: gdb%{?_with_debug:-debug} Name: gdb%{?_with_debug:-debug}
@ -31,7 +36,7 @@ Version: 7.0
# The release always contains a leading reserved number, start it at 1. # 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. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 12%{?_with_upstream:.upstream}%{dist} Release: 13%{?_with_upstream:.upstream}%{dist}
License: GPLv3+ License: GPLv3+
Group: Development/Debuggers Group: Development/Debuggers
@ -415,6 +420,9 @@ Patch395: gdb-empty-namespace.patch
# Fix regression on re-setting the single ppc watchpoint slot. # Fix regression on re-setting the single ppc watchpoint slot.
Patch396: gdb-ppc-hw-watchpoint-twice.patch Patch396: gdb-ppc-hw-watchpoint-twice.patch
# Fix regression by python on ia64 due to stale current frame.
Patch397: gdb-follow-child-stale-parent.patch
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
Requires: readline Requires: readline
BuildRequires: readline-devel BuildRequires: readline-devel
@ -658,6 +666,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch394 -p1 %patch394 -p1
%patch395 -p1 %patch395 -p1
%patch396 -p1 %patch396 -p1
%patch397 -p1
find -name "*.orig" | xargs rm -f find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen. ! find -name "*.rej" # Should not happen.
@ -969,6 +978,11 @@ fi
%endif %endif
%changelog %changelog
* Mon Dec 21 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0-13.fc12
- [pie] Fix a race in testcase gdb.base/valgrind-db-attach.exp.
- Fix regression by python on ia64 due to stale current frame.
- Disable python iff RHEL-5 && (Brew || ppc64).
* Mon Dec 21 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0-12.fc12 * Mon Dec 21 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0-12.fc12
- Workaround build on native ppc64 host. - Workaround build on native ppc64 host.
- More RHEL-5 compatibility updates. - More RHEL-5 compatibility updates.