1 # Copyright 2012-2019 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/>.
18 if [is_remote target] {
19 # The test always runs locally.
24 if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
28 if { [vgdb_start] == -1 } {
34 while {$loop && $continue_count < 100} {
35 set test "continue #$continue_count"
36 gdb_test_multiple "continue" "" {
37 -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" {
41 -re "Remote connection closed.*\r\n$gdb_prompt $" {
42 fail "$test (remote connection closed)"
43 # Only if valgrind got stuck.
44 kill_wait_spawned_process $valgrind_spawn_id
47 -re "The program is not being run\\.\r\n$gdb_prompt $" {
48 fail "$test (valgrind vgdb has terminated)"
49 # Only if valgrind got stuck.
50 kill_wait_spawned_process $valgrind_spawn_id
53 -re "\r\n$gdb_prompt $" {
54 pass "$test (false warning)"
57 set continue_count [expr $continue_count + 1]
60 set test "p gdb_test_infcall ()"
61 gdb_test_multiple $test $test {
62 -re "unhandled instruction bytes.*\r\n$gdb_prompt $" {
65 -re "Continuing \\.\\.\\..*\r\n\\\$1 = 2\r\n$gdb_prompt $" {