Thread options & clone events (Linux GDBserver)
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:10 +0000 (14:16 +0000)
commit393a6b5947d037a55ce1b57474e1ffb3074f544e
treed01e7d6773f733872e91feebab617b3638e00ccd
parent25b16bc9e791d53028c3c180125a80f345b97d94
Thread options & clone events (Linux GDBserver)

This patch teaches the Linux GDBserver backend to report clone events
to GDB, when GDB has requested them with the GDB_THREAD_OPTION_CLONE
thread option, via the new QThreadOptions packet.

This shuffles code in linux_process_target::handle_extended_wait
around to a more logical order when we now have to handle and
potentially report all of fork/vfork/clone.

Raname lwp_info::fork_relative -> lwp_info::relative as the field is
no longer only about (v)fork.

With this, gdb.threads/stepi-over-clone.exp now cleanly passes against
GDBserver, so remove the native-target-only requirement from that
testcase.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19675
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27830
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Change-Id: I3a19bc98801ec31e5c6fdbe1ebe17df855142bb2
gdb/testsuite/gdb.threads/stepi-over-clone.exp
gdbserver/linux-low.cc
gdbserver/linux-low.h