1 # Copyright 2012-2014 Free Software Foundation, Inc.
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.
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.
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/>.
16 if { [is_remote target] || ![isnative] } then {
17 unsupported "inferior-died.exp"
21 # Until "set follow-fork-mode" and "catch fork" are implemented on
24 if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]} then {
25 unsupported "inferior-died.exp"
29 if { ![support_displaced_stepping] } {
30 unsupported "inferior-died.exp"
36 if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.c] } {
40 gdb_test_no_output "set detach-on-fork off"
41 gdb_test_no_output "set non-stop on"
47 set line [gdb_get_line_number "Break here"]
48 gdb_breakpoint $srcfile:$line
50 gdb_continue_to_breakpoint "breakpoint"
52 gdb_test "inferior 2" "Switching to inferior 2.*"
54 # The inferior 1 exit may come unexpectedly in any moment.
57 gdb_test_multiple $test $test {
58 -re "($gdb_prompt |\\\[Inferior \[^\r\n\]* exited normally\\\])" {
67 # Internal error may show up after all the messages above.