]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/async-shell.exp
aarch64: add SPMU system registers missed in f01ae0392ed
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / async-shell.exp
CommitLineData
1d506c26 1# Copyright (C) 2011-2024 Free Software Foundation, Inc.
5be4dfca
JK
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
a64d2530 16standard_testfile
d5b4a7be 17
0a7043e0 18require support_displaced_stepping
d5b4a7be 19
3a3dad98 20# The testfile uses "run". The real bug happened only for ![is_remote target].
8ce7423f 21require !use_gdb_stub
3a3dad98 22
93df4a1d
SM
23save_vars { GDBFLAGS } {
24 set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
25 if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
26 return -1
27 }
5be4dfca
JK
28}
29
e7de8362 30set gdbindex_warning_re "warning: Skipping \[^\r\n\]+ \\.gdb_index section \[^\r\n\]*\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\."
481860b3 31
f6c87418 32gdb_test -no-prompt-anchor "run &" "Starting program: \[^\r\n\]*(\r\n$gdbindex_warning_re)?"
5be4dfca
JK
33
34# `sleep 5' here would workaround the bug, do not sleep here.
35# "shell" could eat waitpid event from the asynchronous inferior process.
36
37gdb_test "shell echo foo" "foo"
38
39set test "interrupt"
40gdb_test_multiple $test $test {
41 -re "interrupt\r\n$gdb_prompt " {
42 pass $test
43 }
44}
45
46set test "process stopped"
47gdb_test_multiple "" $test {
f303dbd6 48 -re "Program stopped\\\.\r\n" {
5be4dfca
JK
49 pass $test
50 }
51}