diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdbserver-support.exp | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 42484fa..d5ff002 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-03-19 Kevin Buettner <kevinb@redhat.com> + + * lib/gdbserver-support.exp (gdbserver_exit): Use the + "-nowait" flag when waiting for gdbserver to exit. + 2021-03-19 Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com> * gdb.base/info-macros.exp: Append -fdebug-macro to diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index 7b48b5a..0886634 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -421,7 +421,12 @@ proc close_gdbserver {} { verbose "Quitting GDBserver" catch "close -i $server_spawn_id" - catch "wait -i $server_spawn_id" + + # If gdbserver misbehaves, and ignores the close, waiting for it + # without the -nowait flag will cause testing to hang. Passing + # -nowait makes expect tell Tcl to wait for the process in the + # background. + catch "wait -nowait -i $server_spawn_id" unset server_spawn_id } |