Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb, testsuite: fix regression in gdb.multi/multi-{exit, kill}.exp
@ 2026-04-17 10:35 Tankut Baris Aktemur
  2026-04-17 14:10 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Tankut Baris Aktemur @ 2026-04-17 10:35 UTC (permalink / raw)
  To: gdb-patches

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.
---
 gdb/testsuite/gdb.server/require-running.exp | 1 -
 gdbserver/server.cc                          | 1 -
 2 files changed, 2 deletions(-)

diff --git a/gdb/testsuite/gdb.server/require-running.exp b/gdb/testsuite/gdb.server/require-running.exp
index f06ece3496d..179c7ccc1ca 100644
--- a/gdb/testsuite/gdb.server/require-running.exp
+++ b/gdb/testsuite/gdb.server/require-running.exp
@@ -49,7 +49,6 @@ set packets \
     "s" \
     "S00" \
     "T1" \
-    "vCont;c" \
     "x1234,1" \
     "X1234,1:00" \
     "z0,0x1234,0" \
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index ebde831d603..37859f26b7e 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -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;
 	}
-- 
2.34.1

Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gdb, testsuite: fix regression in gdb.multi/multi-{exit, kill}.exp
  2026-04-17 10:35 [PATCH] gdb, testsuite: fix regression in gdb.multi/multi-{exit, kill}.exp Tankut Baris Aktemur
@ 2026-04-17 14:10 ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2026-04-17 14:10 UTC (permalink / raw)
  To: Tankut Baris Aktemur, gdb-patches

Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> writes:

> 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>

thanks,
Andrew



> ---
>  gdb/testsuite/gdb.server/require-running.exp | 1 -
>  gdbserver/server.cc                          | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.server/require-running.exp b/gdb/testsuite/gdb.server/require-running.exp
> index f06ece3496d..179c7ccc1ca 100644
> --- a/gdb/testsuite/gdb.server/require-running.exp
> +++ b/gdb/testsuite/gdb.server/require-running.exp
> @@ -49,7 +49,6 @@ set packets \
>      "s" \
>      "S00" \
>      "T1" \
> -    "vCont;c" \
>      "x1234,1" \
>      "X1234,1:00" \
>      "z0,0x1234,0" \
> diff --git a/gdbserver/server.cc b/gdbserver/server.cc
> index ebde831d603..37859f26b7e 100644
> --- a/gdbserver/server.cc
> +++ b/gdbserver/server.cc
> @@ -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;
>  	}
> -- 
> 2.34.1
>
> Intel Deutschland GmbH
> Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
> Tel: +49 89 991 430, www.intel.de
> Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Seat: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-17 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-17 10:35 [PATCH] gdb, testsuite: fix regression in gdb.multi/multi-{exit, kill}.exp Tankut Baris Aktemur
2026-04-17 14:10 ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox