From c1c2c92c212fcfeb72569e541c441a25c06a2148 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 5 Feb 2009 15:54:27 +0000 Subject: [PATCH] Drop the gdb.threads/attach-into-signal.exp change as obsolete. --- gdb-6.8-attach-signalled-detach-stopped.patch | 177 ------------------ gdb.spec | 2 + 2 files changed, 2 insertions(+), 177 deletions(-) diff --git a/gdb-6.8-attach-signalled-detach-stopped.patch b/gdb-6.8-attach-signalled-detach-stopped.patch index 44728d6..4b94ca5 100644 --- a/gdb-6.8-attach-signalled-detach-stopped.patch +++ b/gdb-6.8-attach-signalled-detach-stopped.patch @@ -79,183 +79,6 @@ Index: gdb-6.8.50.20081128/gdb/linux-nat.c } static LONGEST -Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c -=================================================================== ---- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-05-01 20:50:14.000000000 +0200 -+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-12-06 21:57:23.000000000 +0100 -@@ -1,19 +1,20 @@ - /* This testcase is part of GDB, the GNU debugger. - -- Copyright 2008 Free Software Foundation, Inc. -+ Copyright 2007 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -+ the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -- -+ - You should have received a copy of the GNU General Public License -- along with this program. If not, see . */ -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - - #include - #include -@@ -40,8 +41,10 @@ static void *func (void *arg) - - raise (SIGALRM); - -- /* We must not get past this point, either in a free standing or debugged -- state. */ -+ /* This should be NOTREACHED but sometimes it is reached - Bug 427860. -+ We never get here without ptrace(2). It may also be a kernel bug. */ -+ for (;;) -+ pause (); - - abort (); - /* NOTREACHED */ -Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp -=================================================================== ---- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-05-01 20:50:14.000000000 +0200 -+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-12-06 21:57:23.000000000 +0100 -@@ -1,27 +1,29 @@ --# Copyright 2008 --# Free Software Foundation, Inc. -+# Copyright 2007 - - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 3 of the License, or -+# the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. --# -+# - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. --# -+# - # You should have received a copy of the GNU General Public License --# along with this program. If not, see . -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - # This test was created by modifying attach-stopped.exp. - # This file was created by Jan Kratochvil . - --# This test only works on Linux --if { ![isnative] || [is_remote host] || ![istarget *-linux*] } { -- continue -+if $tracelevel then { -+ strace $tracelevel - } - -+set prms_id 0 -+set bug_id 0 -+ - set testfile "attach-into-signal" - set srcfile ${testfile}.c - set binfile ${objdir}/${subdir}/${testfile} -@@ -60,6 +62,10 @@ proc corefunc { threadtype } { - set attempt 1 - set passes 1 - while { $passes < 3 && $attempt <= $attempts } { -+ -+ # Start with clean gdb -+ gdb_exit -+ - set stoppedtry 0 - while { $stoppedtry < 10 } { - if [catch {open /proc/${testpid}/status r} fileid] { -@@ -83,10 +89,30 @@ proc corefunc { threadtype } { - break - } - -+ gdb_start -+ gdb_reinitialize_dir $srcdir/$subdir -+ gdb_load ${binfile} -+ -+ # No PASS message as we may be looping in multiple attempts. -+ gdb_test "set debug lin-lwp 1" "" "" -+ -+ set test "$threadtype: set file (pass $passes), before attach1 to stopped process" -+ if {[gdb_test_multiple "file $binfile" $test { -+ -re "Load new symbol table from.*y or n. $" { -+ # No PASS message as we may be looping in multiple attempts. -+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." "" -+ } -+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" { -+ # No PASS message as we may be looping in multiple attempts. -+ } -+ }] != 0 } { -+ break -+ } -+ - # Main test: - set test "$threadtype: attach (pass $passes), pending signal catch" - if {[gdb_test_multiple "attach $testpid" $test { -- -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*Received Alarm clock.*$gdb_prompt $" { -+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*Redelivering pending Alarm clock..*$gdb_prompt $" { - # nonthreaded: - pass $test - verbose -log "$test succeeded on the attempt # $attempt of $attempts" -@@ -97,7 +123,7 @@ proc corefunc { threadtype } { - # We just lack the luck, we should try it again. - set attempt [expr $attempt + 1] - } -- -re "Attaching to process $testpid.*Received Alarm clock.*$gdb_prompt $" { -+ -re "Attaching to process $testpid.*Redelivering pending Alarm clock..*$gdb_prompt $" { - # threaded: - pass $test - verbose -log "$test succeeded on the attempt # $attempt of $attempts" -@@ -111,8 +137,6 @@ proc corefunc { threadtype } { - }] != 0 } { - break - } -- -- gdb_test "detach" "Detaching from.*" "" - } - if {$passes < 3} { - if {$attempt > $attempts} { -@@ -138,20 +162,12 @@ proc corefunc { threadtype } { - remote_exec build "kill -9 ${testpid}" - } - --# Start with clean gdb --gdb_exit -- - # build the test case first without threads - # - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - gdb_suppress_entire_file "Testcase nonthraded compile failed, so all tests in this file will automatically fail." - } - --gdb_start --gdb_reinitialize_dir $srcdir/$subdir --gdb_load ${binfile} --gdb_test "set debug lin-lwp 1" "" "" -- - corefunc nonthreaded - - # build the test case also with threads -@@ -160,9 +176,4 @@ if { [gdb_compile_pthreads "${srcdir}/$ - gdb_suppress_entire_file "Testcase threaded compile failed, so all tests in this file will automatically fail." - } - --gdb_start --gdb_reinitialize_dir $srcdir/$subdir --gdb_load ${binfile} --gdb_test "set debug lin-lwp 1" "" "" -- - corefunc threaded Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.c =================================================================== --- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-stopped.c 2008-05-01 20:50:14.000000000 +0200 diff --git a/gdb.spec b/gdb.spec index f5f17f0..4635091 100644 --- a/gdb.spec +++ b/gdb.spec @@ -834,6 +834,8 @@ fi %endif %changelog +- Drop the gdb.threads/attach-into-signal.exp change as obsolete. + * Sun Dec 14 2008 Jan Kratochvil - 6.8.50.20081214-1 - Upgrade to the upstream gdb-6.8.50 snapshot.