|
| 1 | +# Copyright 2010 Free Software Foundation, Inc. |
| 2 | + |
| 3 | +# This program is free software; you can redistribute it and/or modify |
| 4 | +# it under the terms of the GNU General Public License as published by |
| 5 | +# the Free Software Foundation; either version 3 of the License, or |
| 6 | +# (at your option) any later version. |
| 7 | +# |
| 8 | +# This program is distributed in the hope that it will be useful, |
| 9 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | +# GNU General Public License for more details. |
| 12 | +# |
| 13 | +# You should have received a copy of the GNU General Public License |
| 14 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | + |
| 16 | +if { [skip_cplus_tests] } { continue } |
| 17 | + |
| 18 | +set testfile cxxexec |
| 19 | +if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.cc {c++ debug}] } { |
| 20 | + return -1 |
| 21 | +} |
| 22 | + |
| 23 | +runto_main |
| 24 | + |
| 25 | +# We could stop after `continue' again at `main'. |
| 26 | +delete_breakpoints |
| 27 | + |
| 28 | +set test "p _Unwind_DebugHook" |
| 29 | +gdb_test_multiple $test $test { |
| 30 | + -re " = .* 0x\[0-9a-f\].*\r\n$gdb_prompt $" { |
| 31 | + pass $test |
| 32 | + } |
| 33 | + -re "\r\nNo symbol .*\r\n$gdb_prompt $" { |
| 34 | + xfail $test |
| 35 | + untested ${testfile}.exp |
| 36 | + return -1 |
| 37 | + } |
| 38 | +} |
| 39 | + |
| 40 | +set test continue |
| 41 | +gdb_test_multiple $test $test { |
| 42 | + -re "Cannot access memory at address 0x\[0-9a-f\]+\r\n$gdb_prompt $" { |
| 43 | + fail $test |
| 44 | + } |
| 45 | + -re "\r\n$gdb_prompt $" { |
| 46 | + pass $test |
| 47 | + } |
| 48 | +} |
| 49 | + |
| 50 | +# `info inferiors' can show <null> on older GDBs. |
| 51 | +gdb_test "info threads" "info threads" "program finished" |
0 commit comments