bd518c3
[base]
bd518c3
bd518c3
2007-10-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
bd518c3
bd518c3
	* linux-nat.c (iterate_over_lwps): Fixed missing LWP initialization for
bd518c3
	current INFERIOR_PTID.
bd518c3
bd518c3
2007-10-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
bd518c3
bd518c3
	* gdb.base/follow-child.exp, gdb.base/follow-child.c: New files.
bd518c3
eb9d945
2007-10-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
eb9d945
eb9d945
	Port to GDB-6.7.
eb9d945
25ff8a1
2008-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
25ff8a1
25ff8a1
	Port to GDB-6.8pre.
25ff8a1
e3c8b47
2008-08-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
e3c8b47
e3c8b47
	Remove the fix as causing an assertion failure for
e3c8b47
	gdb.base/checkpoint.exp and it is no longer needed for
e3c8b47
	gdb.base/follow-child.exp .
e3c8b47
25ff8a1
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.c
25ff8a1
===================================================================
25ff8a1
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
25ff8a1
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.c	2008-02-22 08:14:04.000000000 +0100
bd518c3
@@ -0,0 +1,29 @@
bd518c3
+/* This testcase is part of GDB, the GNU debugger.
bd518c3
+
bd518c3
+   Copyright 2007 Free Software Foundation, Inc.
bd518c3
+
bd518c3
+   This program is free software; you can redistribute it and/or modify
bd518c3
+   it under the terms of the GNU General Public License as published by
bd518c3
+   the Free Software Foundation; either version 2 of the License, or
bd518c3
+   (at your option) any later version.
bd518c3
+
bd518c3
+   This program is distributed in the hope that it will be useful,
bd518c3
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
bd518c3
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
bd518c3
+   GNU General Public License for more details.
25ff8a1
+
bd518c3
+   You should have received a copy of the GNU General Public License
bd518c3
+   along with this program; if not, write to the Free Software
bd518c3
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
bd518c3
+
bd518c3
+   Please email any bugs, comments, and/or additions to this file to:
bd518c3
+   bug-gdb@prep.ai.mit.edu  */
bd518c3
+
bd518c3
+#include <unistd.h>
bd518c3
+
bd518c3
+int main()
bd518c3
+{
bd518c3
+  fork ();
bd518c3
+  sleep (60);
bd518c3
+  return 0;
bd518c3
+}
25ff8a1
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.exp
25ff8a1
===================================================================
25ff8a1
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
25ff8a1
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.exp	2008-02-22 08:14:17.000000000 +0100
bd518c3
@@ -0,0 +1,55 @@
bd518c3
+# Copyright 2007 Free Software Foundation, Inc.
bd518c3
+
bd518c3
+# This program is free software; you can redistribute it and/or modify
bd518c3
+# it under the terms of the GNU General Public License as published by
bd518c3
+# the Free Software Foundation; either version 2 of the License, or
bd518c3
+# (at your option) any later version.
bd518c3
+# 
bd518c3
+# This program is distributed in the hope that it will be useful,
bd518c3
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
bd518c3
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
bd518c3
+# GNU General Public License for more details.
bd518c3
+# 
bd518c3
+# You should have received a copy of the GNU General Public License
bd518c3
+# along with this program; if not, write to the Free Software
25ff8a1
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
bd518c3
+
bd518c3
+if $tracelevel then {
bd518c3
+    strace $tracelevel
bd518c3
+}
bd518c3
+
bd518c3
+set prms_id 0
bd518c3
+set bug_id 0
bd518c3
+
bd518c3
+set testfile follow-child
bd518c3
+set srcfile ${testfile}.c
bd518c3
+set binfile ${objdir}/${subdir}/${testfile}
bd518c3
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
bd518c3
+    untested "Couldn't compile test program"
bd518c3
+    return -1
bd518c3
+}
bd518c3
+
bd518c3
+# Get things started.
bd518c3
+
bd518c3
+gdb_exit
bd518c3
+gdb_start
bd518c3
+gdb_reinitialize_dir $srcdir/$subdir
bd518c3
+gdb_load ${binfile}
bd518c3
+
bd518c3
+# For C programs, "start" should stop in main().
bd518c3
+
bd518c3
+gdb_test "set follow-fork-mode child" ""
bd518c3
+set test "started"
bd518c3
+# GDB_RUN_CMD already checks for `Starting program:'.
bd518c3
+gdb_run_cmd
bd518c3
+sleep 5
bd518c3
+send_gdb "\003"
bd518c3
+set test "break"
bd518c3
+gdb_test_multiple "" $test {
bd518c3
+    -re "Program received signal SIGINT.*$gdb_prompt $" {
bd518c3
+	pass $test
bd518c3
+    }
bd518c3
+    -re "\\\[New process \[0-9\]+\\\]" {
bd518c3
+	fail $test
bd518c3
+    }
bd518c3
+}