-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
# Check that we can connect to GDBserver with the multiprocess
-# extensions disabled, and run to main.
+# extensions disabled, run to main, and finish the process.
load_lib gdbserver-support.exp
gdb_test_no_output "set remote multiprocess-feature $multiprocess"
- set res [gdbserver_spawn ${binfile}]
+ set res [gdbserver_spawn ""]
set gdbserver_protocol [lindex $res 0]
set gdbserver_gdbport [lindex $res 1]
"target $gdbserver_protocol"
gdb_test "continue" "main .*" "continue to main"
+
+ # The W/X packets do not include the PID of the exiting process
+ # without the multi-process extensions. Check that we handle
+ # process exit correctly in that case.
+ gdb_continue_to_end
}
foreach multiprocess { "off" "auto" } {