On Fri, Oct 30, 2026 at 5:21 PM Pierrick Bouvier
<[email protected]> wrote:
>
> From: Justin Sapp <[email protected]>
>
> https://sourceware.org/gdb/current/onlinedocs/gdb.html/General-Query-Packets.html#qSupported
> ```
> Whenever the stub receives a ‘qSupported’ request, the supplied set
> of GDB features should override any previous request. This allows GDB to
> put the stub in a known state, even if the stub had previously been
> communicating with a different version of GDB.
> ```
>
> We exposed this by connecting to gdbstub using a gdb client first, and
> then WinDbg (EXDI) for windows kernel debugging. Since they both
> differ in their multiprocess support, this was confusing EXDI.
>
> While we are here, fix the same for fork_events in user mode.
>
> Signed-off-by: Pierrick Bouvier <[email protected]>
> ---
>  gdbstub/gdbstub.c | 6 ++++++
>  gdbstub/user.c    | 1 +
>  2 files changed, 7 insertions(+)
>

IIUC, in user mode a bare qSupported doesn't clear fork_events,
so a previous client's fork-events+ stays active for the next client.

E.g. GDB connects with fork-events+ and disconnects, then a client
sends a bare qSupported. On fork() the stub stops the parent and
reports the fork to the client, but it should not report it and the
parent should keep running.

Reply via email to