]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb, testsuite: fix regression in gdb.multi/multi-{exit, kill}.exp
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 20 Apr 2026 07:26:15 +0000 (09:26 +0200)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 20 Apr 2026 07:26:15 +0000 (09:26 +0200)
Commit d19862435df418a2ec78d078048f54d115c67a66 ("gdbserver:
require_running_or_break for the 'z' and 'vCont' packets") introduced
regressions in gdb.multi/multi-exit.exp and gdb.multi/multi-kill.exp.

If the remote target has multiple inferiors and is resumed with
schedule-multi on, all processes may terminate, making the target have
no threads left.  The target reports termination events to GDB.  GDB
processes the first event and attempts to stop all processes.  For
this, it sends 'vCont;t' packets to the target.  But the patch mentioned
above required the target to be in a running state, which is not true
anymore.  Therefore, target responds with an error.

Fix the regression by reverting the 'require_running_or_return'
enforcement for vCont.

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/testsuite/gdb.server/require-running.exp
gdbserver/server.cc

index f06ece3496da5157f07f6e3c9e0ab9a04c88c750..179c7ccc1cad3012058b22533779960435fef7c1 100644 (file)
@@ -49,7 +49,6 @@ set packets \
     "s" \
     "S00" \
     "T1" \
-    "vCont;c" \
     "x1234,1" \
     "X1234,1:00" \
     "z0,0x1234,0" \
index ebde831d6031d658774256fc25d169ee56570968..37859f26b7e4c3972d62aeebbed48d6030c2d4ee 100644 (file)
@@ -3575,7 +3575,6 @@ handle_v_requests (char *own_buf, int packet_len, int *new_packet_len)
 
       if (startswith (own_buf, "vCont;"))
        {
-         require_running_or_return (own_buf);
          handle_v_cont (own_buf);
          return;
        }