aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server/non-existing-program.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.server/non-existing-program.exp')
-rw-r--r--gdb/testsuite/gdb.server/non-existing-program.exp12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp
index d404564..68d4d53 100644
--- a/gdb/testsuite/gdb.server/non-existing-program.exp
+++ b/gdb/testsuite/gdb.server/non-existing-program.exp
@@ -39,8 +39,16 @@ set spawn_id [remote_spawn target "$gdbserver stdio non-existing-program"]
set msg "gdbserver exits cleanly"
set saw_exiting 0
expect {
- # This is what we get on ptrace-based targets.
- -re "stdin/stdout redirected.*No program to debug\r\nExiting\r\n$" {
+ # This is what we get on ptrace-based targets with
+ # startup-with-shell disabled (e.g., when the SHELL variable is
+ # unset).
+ -re "stdin/stdout redirected.*gdbserver: Cannot exec non-existing-program\r\ngdbserver: Error: No such file or directory\r\n\r\nDuring startup program exited with code 127\.\r\nExiting\r\n$" {
+ set saw_exiting 1
+ exp_continue
+ }
+ # Likewise, but with startup-with-shell enabled, which is the
+ # default behaviour.
+ -re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n$" {
set saw_exiting 1
exp_continue
}