Blame SOURCES/gdb-archer-next-over-throw-cxx-exec.patch

861f93
Archer-upstreamed:
861f93
http://sourceware.org/ml/archer/2010-q2/msg00031.html
861f93
861f93
--- ./gdb/testsuite/gdb.cp/cxxexec.cc	1970-01-01 01:00:00.000000000 +0100
861f93
+++ ./gdb/testsuite/gdb.cp/cxxexec.cc	2010-05-29 01:18:56.000000000 +0200
861f93
@@ -0,0 +1,25 @@
861f93
+/* This test script is part of GDB, the GNU debugger.
861f93
+
861f93
+   Copyright 2010 Free Software Foundation, Inc.
861f93
+
861f93
+   This program is free software; you can redistribute it and/or modify
861f93
+   it under the terms of the GNU General Public License as published by
861f93
+   the Free Software Foundation; either version 3 of the License, or
861f93
+   (at your option) any later version.
861f93
+
861f93
+   This program is distributed in the hope that it will be useful,
861f93
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
861f93
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
861f93
+   GNU General Public License for more details.
861f93
+
861f93
+   You should have received a copy of the GNU General Public License
861f93
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
861f93
+
861f93
+#include <unistd.h>
861f93
+
861f93
+int
861f93
+main()
861f93
+{
861f93
+  execlp ("true", "true", NULL);
861f93
+  return 1;
861f93
+}
861f93
--- ./gdb/testsuite/gdb.cp/cxxexec.exp	1970-01-01 01:00:00.000000000 +0100
861f93
+++ ./gdb/testsuite/gdb.cp/cxxexec.exp	2010-05-29 01:29:25.000000000 +0200
861f93
@@ -0,0 +1,51 @@
861f93
+# Copyright 2010 Free Software Foundation, Inc.
861f93
+
861f93
+# This program is free software; you can redistribute it and/or modify
861f93
+# it under the terms of the GNU General Public License as published by
861f93
+# the Free Software Foundation; either version 3 of the License, or
861f93
+# (at your option) any later version.
861f93
+#
861f93
+# This program is distributed in the hope that it will be useful,
861f93
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
861f93
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
861f93
+# GNU General Public License for more details.
861f93
+#
861f93
+# You should have received a copy of the GNU General Public License
861f93
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
861f93
+
861f93
+if { [skip_cplus_tests] } { continue }
861f93
+
861f93
+set testfile cxxexec
861f93
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.cc {c++ debug}] } {
861f93
+    return -1
861f93
+}
861f93
+
861f93
+runto_main
861f93
+
861f93
+# We could stop after `continue' again at `main'.
861f93
+delete_breakpoints
861f93
+
861f93
+set test "p _Unwind_DebugHook"
861f93
+gdb_test_multiple $test $test {
861f93
+    -re " = .* 0x\[0-9a-f\].*\r\n$gdb_prompt $" {
861f93
+	pass $test
861f93
+    }
861f93
+    -re "\r\nNo symbol .*\r\n$gdb_prompt $" {
861f93
+	xfail $test
861f93
+	untested ${testfile}.exp
861f93
+	return -1
861f93
+    }
861f93
+}
861f93
+
861f93
+set test continue
861f93
+gdb_test_multiple $test $test {
861f93
+    -re "Cannot access memory at address 0x\[0-9a-f\]+\r\n$gdb_prompt $" {
861f93
+	fail $test
861f93
+    }
861f93
+    -re "\r\n$gdb_prompt $" {
861f93
+	pass $test
861f93
+    }
861f93
+}
861f93
+
861f93
+# `info inferiors' can show <null> on older GDBs.
861f93
+gdb_test "info threads" "info threads" "program finished"