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

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