]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdbserver: Hide and don't detach pending clone children
authorPedro Alves <pedro@palves.net>
Fri, 3 Dec 2021 22:10:05 +0000 (22:10 +0000)
committerPedro Alves <pedro@palves.net>
Mon, 12 Dec 2022 19:04:15 +0000 (19:04 +0000)
commitcd384f6e936856aea7e27d15254e3841340702f7
tree2d03e3676d3ad6a3ccec4e324ee1ff988636766c
parent685ac58d0d785765749e930669667ac3b9a11dfb
gdbserver: Hide and don't detach pending clone children

This commit extends the logic added by these two commits from a while
ago:

 #1  7b961964f866  (gdbserver: hide fork child threads from GDB),
 #2  df5ad102009c  (gdb, gdbserver: detach fork child when detaching from fork parent)

... to handle thread clone events, which are very similar to (v)fork
events.

For #1, we want to hide clone children as well, so just update the
comments.

For #2, unlike (v)fork children, pending clone children aren't full
processes, they're just threads, so don't detach them in
handle_detach.  linux-low.cc will take care of detaching them along
with all other threads of the process, there's nothing special that
needs to be done.

Change-Id: I7f5901d07efda576a2522d03e183994e071b8ffc
gdbserver/linux-low.cc
gdbserver/linux-low.h
gdbserver/server.cc
gdbserver/target.cc
gdbserver/target.h