- send_gdb "continue\n"
- gdb_expect {
- -re "GNU gdb \[0-9\.\]*.*
-Copyright \[0-9\]* Free Software Foundation, Inc.*
-GDB is free software, covered by the GNU General Public License, and you are.*
-welcome to change it and/or distribute copies of it under certain conditions.*
-Type \"show copying\" to see the conditions.*
-There is absolutely no warranty for GDB. Type \"show warranty\" for details.*
-This GDB was configured as .*$gdb_prompt $"\
- { pass "xgdb is at prompt" }
- -re "GDB is free software and you are welcome to distribute copies of it.*
- under certain conditions; type \"show copying\" to see the conditions..*
-There is absolutely no warranty for GDB; type \"show warranty\" for details..*
-GDB.*Copyright \[0-9\]+ Free Software Foundation, Inc..*$gdb_prompt $"\
- { pass "xgdb is at prompt (obsolescent gdb)" }
- -re ".*$gdb_prompt $" { fail "xgdb is at prompt" }
- timeout { fail "(timeout) xgdb is at prompt" }
- }
-
- # set xgdb prompt so we can tell which is which
- send_gdb "set prompt (xgdb) \n"
- gdb_expect {
- -re "\[(\]xgdb\[)\].*\[(\]xgdb\[)\] $" { pass "Set xgdb prompt" }
- -re ".*$gdb_prompt $" { fail "Set xgdb prompt" }
- default { fail "(timeout) Set xgdb prompt" }
+ if [target_info exists gdb,noinferiorio] {
+ # Maybe testing with a local extended-remote gdbserver. With
+ # no way to interact with inferior GDB, all we can do is let
+ # it run.
+ send_gdb "continue\n"
+ # Wait a bit while the inferior gdb gets to its prompt.
+ sleep 1
+ } else {
+ set test "xgdb is at prompt"
+ gdb_test_multiple "continue" $test {
+ -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law. Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
+ pass $test
+ }
+ }
+
+ # set xgdb prompt so we can tell which is which
+ gdb_test_multiple "set prompt (xgdb) " "Set xgdb_prompt" {
+ -re "\[(\]xgdb\[)\].*\[(\]xgdb\[)\] $" {
+ pass "Set xgdb prompt"
+ }
+ }