[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.base / continue-all-already-running.exp
blob440735e9188e835d77827ef576f9adce4f829f3a
1 # Copyright (C) 2014-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/>.
16 # Test that "c -a" doesn't leave GDB processing input, even if all
17 # threads were already running. PR gdb/17300.
19 standard_testfile
21 if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
22 return -1
25 gdb_test_no_output "set non-stop on"
27 if ![runto_main] {
28 return
31 set linenum [gdb_get_line_number "set break here"]
32 gdb_breakpoint "$linenum"
34 gdb_test "c -a&" "Continuing\\."
36 set test "no stop"
37 gdb_test_multiple "" $test {
38 -timeout 1
39 timeout {
40 pass $test
44 # Paranoia. Check that input works after bg command.
45 gdb_test "print 1" " = 1"
47 # Continue in the foreground, and wait one second to make sure the
48 # inferior really starts running. If we get a prompt to soon (e.g.,
49 # the program stops), this issues a fail.
50 set saw_continuing 0
51 set test "c -a"
52 gdb_test_multiple "c -a" $test {
53 -timeout 1
54 -re "Continuing\\." {
55 set saw_continuing 1
56 exp_continue
58 timeout {
59 gdb_assert $saw_continuing $test
63 # Type something while the inferior is running in the foreground.
64 send_gdb "print 2\n"
66 # Poor buggy GDB would crash before the breakpoint was hit.
67 set test "breakpoint hit"
68 gdb_test_multiple "" $test {
69 -re "set break here ..\r\n$gdb_prompt " {
70 pass $test
74 set test "print command result"
75 gdb_test_multiple "" $test {
76 -re " = 2\r\n$gdb_prompt $" {
77 pass $test