]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdbserver/server.cc
Support clone events in the remote protocol
authorPedro Alves <pedro@palves.net>
Tue, 23 Nov 2021 20:35:12 +0000 (20:35 +0000)
committerPedro Alves <pedro@palves.net>
Mon, 13 Nov 2023 14:16:09 +0000 (14:16 +0000)
commit53de5394f7bf11995b1d9cb6885a8490b2ebc9da
tree4b55592d4c2bdd5787e4d251c7a7b6d9ea679cc6
parent0d36baa9af0d9929c96b89a184a469c432c68b0d
Support clone events in the remote protocol

The previous patch taught GDB about a new
TARGET_WAITKIND_THREAD_CLONED event kind, and made the Linux target
report clone events.

A following patch will teach Linux GDBserver to do the same thing.

But before we get there, we need to teach the remote protocol about
TARGET_WAITKIND_THREAD_CLONED.  That's what this patch does.  Clone is
very similar to vfork and fork, and the new stop reply is likewise
handled similarly.  The stub reports "T05clone:...".

GDBserver core is taught to handle TARGET_WAITKIND_THREAD_CLONED and
forward it to GDB in this patch, but no backend actually emits it yet.
That will be done in a following patch.

Documentation for this new remote protocol feature is included in a
documentation patch later in the series.

Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Change-Id: If271f20320d864f074d8ac0d531cc1a323da847f
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19675
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27830
gdb/remote.c
gdbserver/remote-utils.cc
gdbserver/server.cc