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

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