On aarch64-linux, occasionally I run into these warnings:
...
PASS: gdb.tui/tui-mode-switch.exp: set style enabled off
WARNING: timeout in accept_gdb_output
PASS: gdb.tui/tui-mode-switch.exp: no boo
WARNING: timeout in accept_gdb_output
...
The first in more detail:
...
Box Dump (40 x 1) @ (0, 11):
11 b(gdb) b
WARNING: timeout in accept_gdb_output
...
Fix this by waiting for a prompt after leaving TUI before sending "b".
Also, while we're at it generate a few more passes.
Tested on aarch64-linux.
# Type "foo".
send_gdb "foo"
set line { 0 11 40 1 }
-Term::wait_for_region_contents {*}$line "^$gdb_prompt foo"
+gdb_assert { [Term::wait_for_region_contents {*}$line "^$gdb_prompt foo"] } \
+ "type foo"
# Enter TUI.
send_gdb "\030\001"
-Term::wait_for ""
+gdb_assert { [Term::wait_for ""] } "enter TUI"
-# Exit TUI, type b.
+# Exit TUI.
send_gdb "\030\001"
+gdb_assert { [Term::wait_for ""] } "exit TUI"
+
+# Type b.
send_gdb "b"
-Term::wait_for_region_contents {*}$line "^$gdb_prompt b"
+gdb_assert { [Term::wait_for_region_contents {*}$line "^$gdb_prompt b"] } \
+ "type b"
# Check that we don't see "boo".
gdb_assert { ![Term::check_region_contents_p {*}$line "^$gdb_prompt boo"] } \