Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 00/11] Enable non-stop mode by default for remote targets
@ 2026-05-18 18:32 Mohamed Bouhaouel
  2026-05-18 18:32 ` [PATCH 01/11] gdb, record: fix assertion when remote target is set to non-stop Mohamed Bouhaouel
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Mohamed Bouhaouel @ 2026-05-18 18:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: mohamed.bouhaouel, stephan.rohr, markus.t.metzger

From: "Bouhaouel, Mohamed" <mohamed.bouhaouel@intel.com>

This series makes remote targets operate in non-stop mode if the target
announces QNonStop support and 'maint set target-non-stop’ is set to
‘auto', aligning the behavior with the Linux native target.

When non-stop is forced on at startup, GDB has no selected thread when DAP
emits a 'continued' or 'stopped' event, and gdb.selected_thread() returns None.
The fix follows the DAP spec: default threadId to 0 for 'continued' (required)
and omit it for 'stopped' (optional) if no thread is selected.
We could not validate this against a real DAP-driven GUI, but the full
DAP testsuite passes.

- Open

'gdb.threads/current-lwp-dead.exp' fails intermittently with this series.
The test deliberately crafts a scenario where the previously-selected LWP has
already exited by the time a breakpoint hits in another LWP (using clone()
without CLONE_THREAD, so GDB still sees the new task as a thread of the same
inferior via PTRACE_EVENT_CLONE).  With a non-stop remote target, GDB
processes the parent's exit event while another LWP is being single-stepped,
and the resulting thread-state churn fails the test.

Bouhaouel, Mohamed (8):
  gdb, remote: fix assertion on reconnect to non-stop target
  gdb, remote: fix async handler assertion on reconnect to non-stop
    target
  gdb, remote: fix "info program" after reconnect to non-stop target
  gdb, remote: fix crash when accessing removed events
  gdb, testsuite: handle async close in monitor-exit-quit.exp
  gdb, testsuite: update attach-deleted-exec.exp to handle async
    messages
  gdb, testsuite: add kfails for step-over-process-exit.exp
  gdb, remote: implement always_non_stop_p for remote target

Markus Metzger (1):
  gdb, record: fix assertion when remote target is set to non-stop

Rohr, Stephan (2):
  gdb, remote: fix ptid matching for process-wide stop events
  gdb, dap: fix DAP events if no thread is selected

 gdb/python/lib/gdb/dap/events.py              | 15 ++++-
 gdb/record-full.c                             |  3 +-
 gdb/remote.c                                  | 59 ++++++++++++++-----
 .../gdb.base/attach-deleted-exec.exp          | 59 +++++++++++--------
 .../gdb.server/monitor-exit-quit.exp          |  9 ++-
 .../gdb.threads/step-over-process-exit.exp    |  6 ++
 6 files changed, 106 insertions(+), 45 deletions(-)

-- 
2.43.0

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] 16+ messages in thread

end of thread, other threads:[~2026-06-12 14:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-18 18:32 [PATCH 00/11] Enable non-stop mode by default for remote targets Mohamed Bouhaouel
2026-05-18 18:32 ` [PATCH 01/11] gdb, record: fix assertion when remote target is set to non-stop Mohamed Bouhaouel
2026-06-10 15:48   ` Andrew Burgess
2026-06-11 15:50     ` Bouhaouel, Mohamed
2026-05-18 18:32 ` [PATCH 02/11] gdb, remote: fix assertion on reconnect to non-stop target Mohamed Bouhaouel
2026-05-18 18:32 ` [PATCH 03/11] gdb, remote: fix async handler " Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 04/11] gdb, remote: fix "info program" after " Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 05/11] gdb, remote: fix crash when accessing removed events Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 06/11] gdb, remote: fix ptid matching for process-wide stop events Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 07/11] gdb, dap: fix DAP events if no thread is selected Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 08/11] gdb, testsuite: handle async close in monitor-exit-quit.exp Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 09/11] gdb, testsuite: update attach-deleted-exec.exp to handle async messages Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 10/11] gdb, testsuite: add kfails for step-over-process-exit.exp Mohamed Bouhaouel
2026-05-18 18:33 ` [PATCH 11/11] gdb, remote: implement always_non_stop_p for remote target Mohamed Bouhaouel
2026-06-10 11:44 ` PING 01 - [PATCH 00/11] Enable non-stop mode by default for remote targets Bouhaouel, Mohamed
2026-06-12 14:20 ` Pedro Alves

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