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