Avoid another inferior_ptid reference in gdb/remote.c
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.server / connect-without-multi-process.exp
index c4214c868f9e7f2ccebff40e0bfffe8dca3642a6..123089260dde2613b49e1d9ccabef49fca95cb5d 100644 (file)
@@ -1,4 +1,4 @@
-# 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
@@ -14,7 +14,7 @@
 # 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
 
@@ -41,7 +41,7 @@ proc do_test {multiprocess} {
 
     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]
 
@@ -52,6 +52,11 @@ proc do_test {multiprocess} {
        "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" } {
This page took 0.039122 seconds and 4 git commands to generate.