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

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