|
|
7a6771 |
2008-03-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
7a6771 |
|
|
|
7a6771 |
Port to GDB-6.8pre.
|
|
|
7a6771 |
Remove the `[' character from the GDB-6.8 default message.
|
|
|
7a6771 |
|
|
|
7a6771 |
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c
|
|
|
7a6771 |
===================================================================
|
|
|
7a6771 |
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
7a6771 |
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c 2016-02-15 23:25:36.686600598 +0100
|
|
|
7a6771 |
@@ -0,0 +1,57 @@
|
|
|
7a6771 |
+/* This testcase is part of GDB, the GNU debugger.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+ Copyright 2007 Free Software Foundation, Inc.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+ This program is free software; you can redistribute it and/or modify
|
|
|
7a6771 |
+ it under the terms of the GNU General Public License as published by
|
|
|
7a6771 |
+ the Free Software Foundation; either version 2 of the License, or
|
|
|
7a6771 |
+ (at your option) any later version.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+ This program is distributed in the hope that it will be useful,
|
|
|
7a6771 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
7a6771 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
7a6771 |
+ GNU General Public License for more details.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+ You should have received a copy of the GNU General Public License
|
|
|
7a6771 |
+ along with this program; if not, write to the Free Software
|
|
|
7a6771 |
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+ Please email any bugs, comments, and/or additions to this file to:
|
|
|
7a6771 |
+ bug-gdb@prep.ai.mit.edu */
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+#include <sys/types.h>
|
|
|
7a6771 |
+#include <sys/wait.h>
|
|
|
7a6771 |
+#include <unistd.h>
|
|
|
7a6771 |
+#include <assert.h>
|
|
|
7a6771 |
+#include <stdlib.h>
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+static void func (void)
|
|
|
7a6771 |
+{
|
|
|
7a6771 |
+}
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+int main (void)
|
|
|
7a6771 |
+{
|
|
|
7a6771 |
+ pid_t child;
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+ child = fork ();
|
|
|
7a6771 |
+ switch (child)
|
|
|
7a6771 |
+ {
|
|
|
7a6771 |
+ case -1:
|
|
|
7a6771 |
+ abort ();
|
|
|
7a6771 |
+ case 0:
|
|
|
7a6771 |
+ func ();
|
|
|
7a6771 |
+ break;
|
|
|
7a6771 |
+ default:
|
|
|
7a6771 |
+ {
|
|
|
7a6771 |
+/* We do not test the switching to the other fork by GDB `fork 1'. */
|
|
|
7a6771 |
+#if 0
|
|
|
7a6771 |
+ pid_t got;
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+ got = waitpid (child, NULL, 0);
|
|
|
7a6771 |
+ assert (got == child);
|
|
|
7a6771 |
+#endif
|
|
|
7a6771 |
+ break;
|
|
|
7a6771 |
+ }
|
|
|
7a6771 |
+ }
|
|
|
7a6771 |
+ return 0;
|
|
|
7a6771 |
+}
|
|
|
7a6771 |
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp
|
|
|
7a6771 |
===================================================================
|
|
|
7a6771 |
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
7a6771 |
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp 2016-02-15 23:27:55.792588265 +0100
|
|
|
7a6771 |
@@ -0,0 +1,36 @@
|
|
|
7a6771 |
+# Copyright 2007 Free Software Foundation, Inc.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+# This program is free software; you can redistribute it and/or modify
|
|
|
7a6771 |
+# it under the terms of the GNU General Public License as published by
|
|
|
7a6771 |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
7a6771 |
+# (at your option) any later version.
|
|
|
7a6771 |
+#
|
|
|
7a6771 |
+# This program is distributed in the hope that it will be useful,
|
|
|
7a6771 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
7a6771 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
7a6771 |
+# GNU General Public License for more details.
|
|
|
7a6771 |
+#
|
|
|
7a6771 |
+# You should have received a copy of the GNU General Public License
|
|
|
7a6771 |
+# along with this program; if not, write to the Free Software
|
|
|
7a6771 |
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+set testfile fork-detach
|
|
|
7a6771 |
+set srcfile ${testfile}.c
|
|
|
7a6771 |
+set binfile [standard_output_file ${testfile}]
|
|
|
7a6771 |
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
|
7a6771 |
+ untested "Couldn't compile test program"
|
|
|
7a6771 |
+ return -1
|
|
|
7a6771 |
+}
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+# Get things started.
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+gdb_exit
|
|
|
7a6771 |
+gdb_start
|
|
|
7a6771 |
+gdb_reinitialize_dir $srcdir/$subdir
|
|
|
7a6771 |
+gdb_load ${binfile}
|
|
|
7a6771 |
+
|
|
|
7a6771 |
+gdb_run_cmd
|
|
|
7a6771 |
+# `Starting program: .*' prefix is available since gdb-6.7.
|
|
|
7a6771 |
+gdb_test "" \
|
|
|
7a6771 |
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
|
|
|
7a6771 |
+ "Info message caught"
|
|
|
7a6771 |
Index: gdb-7.10.90.20160211/gdb/infrun.c
|
|
|
7a6771 |
===================================================================
|
|
|
7a6771 |
--- gdb-7.10.90.20160211.orig/gdb/infrun.c 2016-02-15 23:25:01.432350289 +0100
|
|
|
7a6771 |
+++ gdb-7.10.90.20160211/gdb/infrun.c 2016-02-15 23:27:49.274541986 +0100
|
|
|
7a6771 |
@@ -478,7 +478,7 @@
|
|
|
7a6771 |
remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
|
|
|
7a6771 |
}
|
|
|
7a6771 |
|
|
|
7a6771 |
- if (info_verbose || debug_infrun)
|
|
|
7a6771 |
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun)
|
|
|
7a6771 |
{
|
|
|
7a6771 |
/* Ensure that we have a process ptid. */
|
|
|
7a6771 |
ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid));
|
|
|
7a6771 |
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp
|
|
|
7a6771 |
===================================================================
|
|
|
7a6771 |
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:01.432350289 +0100
|
|
|
7a6771 |
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:36.689600619 +0100
|
|
|
7a6771 |
@@ -165,7 +165,7 @@
|
|
|
7a6771 |
# Deleting the catchpoints
|
|
|
7a6771 |
delete_breakpoints
|
|
|
7a6771 |
|
|
|
7a6771 |
- gdb_continue_to_end
|
|
|
7a6771 |
+ gdb_continue_to_end "" continue 1
|
|
|
7a6771 |
}
|
|
|
7a6771 |
|
|
|
7a6771 |
proc test_catch_syscall_without_args {} {
|
|
|
7a6771 |
@@ -236,7 +236,7 @@
|
|
|
7a6771 |
# If it doesn't, everything is right (since we don't have
|
|
|
7a6771 |
# a syscall named "mlock" in it). Otherwise, this is a failure.
|
|
|
7a6771 |
set thistest "catch syscall with unused syscall ($syscall_name)"
|
|
|
7a6771 |
- gdb_continue_to_end $thistest
|
|
|
7a6771 |
+ gdb_continue_to_end $thistest continue 1
|
|
|
7a6771 |
}
|
|
|
7a6771 |
}
|
|
|
7a6771 |
|